Comment box not showing up
-
Hi,
Ia m using free juliet theme…
I have checked everything, but the comment boxes are not showing up on the posts pages..
I even tried 2-3 plugins….
please help me fix this…
Comment box reference is like this in single.php
<!– Page Comments –>
<?php comment_form(); ?>
<?php if ( comments_open() ) : ?>
<hr />
<?php comments_template(); ?>
<?php endif; ?>
<!– /Page Comments –>I am copying the comments.php file below…
**************************
<?php
/**
* The template for displaying comments
*
* @package juliet
*/if ( post_password_required() ) { return; }
$commenter = wp_get_current_commenter();
$req = get_option( ‘require_name_email’ );$fields = array(
‘author’ => ‘<div class=”row”><div class=”col-sm-6″><div class=”form-group form-group-author”><label class=”form-label form-label-author”>’. esc_html__( ‘Name’, ‘juliet’ ) . ($req ? ‘<span class=”asterisk”>*</span>’ : ”) . ‘</label><input type=”text” class=”form-control” id=”author” name=”author” placeholder=”” value=”‘ . esc_attr( $commenter[‘comment_author’] ) . ‘” /></div>’,’email’ => ‘<div class=”form-group form-group-email”><label class=”form-label form-label-email”>’. esc_html__( ‘Email Address’, ‘juliet’ ) .($req ? ‘<span class=”asterisk”>*</span>’ : ”) . ‘</label><input type=”email” class=”form-control” name=”email” id=”email” placeholder=”” value=”‘ . esc_attr( $commenter[‘comment_author_email’] ) . ‘” /></div>’,
‘url’ => ‘<div class=”form-group form-group-url”><label class=”form-label form-label-url”>’ . esc_html__( ‘Website’, ‘juliet’ ) . ‘</label><input type=”text” class=”form-control” name=”url” id=”url” placeholder=”” value=”‘ . esc_attr( $commenter[‘comment_author_url’] ) . ‘” /></div></div></div>’
);
$comment_field = ‘<div class=”form-group form-group-comment”><label class=”form-label form-label-comment”>’. esc_html__( ‘Comment’, ‘juliet’ ) .'</label><textarea rows=”5″ cols=”” class=”form-control” id=”comment” name=”comment” placeholder=””></textarea></div>’;
$class_submit = ‘btn btn-default’;
$comment_form_args = array( ‘fields’ => apply_filters( ‘comment_form_default_fields’, $fields ),
‘comment_field’ => $comment_field,
‘class_submit’ => $class_submit );?>
<div id=”comments” class=”comments”>
<?php if ( have_comments() ) { ?>
<h3 class=”comment-title”>
<?php
$comments_number = get_comments_number();
if ( 1 === $comments_number ) {
/* translators: %s: post title */
printf( _x( ‘One thought on “%s”’, ‘comments title’, ‘juliet’ ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
_nx(
‘%1$s thought on “%2$s”’,
‘%1$s thoughts on “%2$s”’,
$comments_number,
‘comments title’,
‘juliet’
),
number_format_i18n( $comments_number ),
get_the_title()
);
}
?>
</h3><?php the_comments_navigation(); ?>
<ul class=”comment-list”>
<?php
wp_list_comments( array(
‘style’ => ‘ul’,
‘short_ping’ => true,
‘avatar_size’ => 0,
) );
?><?php the_comments_navigation(); ?>
<?php } ?>
<?php if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), ‘comments’ ) ) { ?>
<p class=”no-comments”><?php esc_html_e( ‘Comments are closed.’, ‘juliet’ ); ?></p>
<?php } ?><?php if ( comments_open() ) {
if ( get_option(‘comment_registration’) && !is_user_logged_in() ) { ?>
<p class=”login-to-comment”><?php printf(__(‘You must be logged in to post a comment.’, ‘juliet’), wp_login_url( get_permalink() )); ?></p>
<?php } else {
comment_form($comment_form_args);
}
} ?></div>
The page I need help with: [log in to see the link]
- The topic ‘Comment box not showing up’ is closed to new replies.