HippySunshine
Senior Member
I have inherited a WP site that now requires a star rating to be added to user comments. I have found a plugin that I like ‘Star Rating’, simple and does what it says, and easy to override styles.
This works perfectly with the default comment_form() from WordPress, but does not work on the custom comment form template that is in the theme. I’ve tried multiple plugins and neither work due to this custom comment form.
Can anyone point out what is missing and why it wont show?
I've asked for help over on the WP fprum but no such luck
Here is the comments.php that the theme is using:
Thank you
This works perfectly with the default comment_form() from WordPress, but does not work on the custom comment form template that is in the theme. I’ve tried multiple plugins and neither work due to this custom comment form.
Can anyone point out what is missing and why it wont show?
I've asked for help over on the WP fprum but no such luck
Here is the comments.php that the theme is using:
PHP:
<?php
// Do not access this file directly
if ( !defined('ABSPATH') ) exit;
// If passworded, must have given password
if ( post_password_required() ) return;
// If comments are closed and there are no comments already, do not show comments at all
if ( !comments_open() && !get_comments_number() ) return;
?>
<div class="comments">
<h5>Comments (<?php comments_number( '0', '1', '%' ); ?>)</h5>
<div class="comments-section">
<?php if ( 'open' == $post->comment_status ) : ?>
<?php if ( get_option( 'comment_registration' ) && !$user_ID ) : ?>
<p class="unstyled">You must <a href="<?php echo get_option( 'siteurl' ); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">log in</a> to post a comment.</p>
<?php else : ?>
<form action="<?php echo get_option( 'siteurl' ); ?>/wp-comments-post.php" method="post" id="comment_form">
<?php if ( $user_ID ) { ?>
<p class="unstyled">Logged in as <a href="<?php echo get_option( 'siteurl' ); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>.
<a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="<?php _e( 'Log out of this account' ) ?>">Logout »</a></p>
<?php } ?>
<?php if ( !$user_ID ) { ?>
<input class="u-full-width" type="text" name="author" id="author" value="<?php echo $comment_author; ?>" tabindex="1" placeholder="NAME" />
<input class="u-full-width" type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" tabindex="2" placeholder="EMAIL" />
<input class="u-full-width" type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" tabindex="3" placeholder="WEBSITE" />
<?php } ?>
<textarea class="u-full-width main" name="comment" id="comment" rows="8" tabindex="4" placeholder=""></textarea>
<?php comment_id_fields(); ?><input name="submit" type="submit" id="submit" tabindex="5" value="Post Comment..." />
<?php do_action( 'comment_form', $post->ID ); ?>
</form>
<?php endif; // If registration required and not logged in ?>
<?php endif; ?>
</div>
<?php if ( have_comments() ) { ?>
<ul class="comment-block" id="comment-block">
<?php
// Callback defined in /_includes/functions/theme-functions.php
wp_list_comments( 'callback=aa_list_comments' );
?>
</ul>
<?php } ?>
</div>
Thank you