• Hi, In my blog, comment form working well but not showing approved comments.

    My codes

    comments.php

    
    <?php
    $args = array(
        'fields' => apply_filters(
            'comment_form_default_fields', array(
                'author' =>'<p class="comment-form-author">' . '<input id="author" placeholder="Your Name (No Keywords)" name="author" type="text" value="' .
                    esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' />'.
                    '<label for="author">' . __( 'Your Name' ) . '</label> ' .
                    ( $req ? '<span class="required">*</span>' : '' )  .
                    '</p>'
                    ,
                'email'  => '<p class="comment-form-email">' . '<input id="email" placeholder="[email protected]" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) .
                    '" size="30"' . $aria_req . ' />'  .
                    '<label for="email">' . __( 'Your Email' ) . '</label> ' .
                    ( $req ? '<span class="required">*</span>' : '' )
                     .
                    '</p>',
                'url'    => '<p class="comment-form-url">' .
                 '<input id="url" name="url" placeholder="https://your-site-name.com" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /> ' .
                '<label for="url">' . __( 'Website', 'domainreference' ) . '</label>' .
                   '</p>'
            )
        ),
        'comment_field' => '<p class="comment-form-comment">' .
            '<label for="comment">' . __( 'Let us know what you have to say:' ) . '</label>' .
            '<textarea id="comment" name="comment" placeholder="Express your thoughts, idea or write a feedback by clicking here & start an awesome comment" cols="45" rows="8" aria-required="true"></textarea>' .
            '</p>',
        'comment_notes_after' => '',
        'title_reply' => '<div class="crunchify-text"> <h5>Please Post Your Comments & Reviews</h5></div>'
    );
    
    
    

    single.php

    
    <?php
    /*
    Template Name: Single page
    */
    ?>
    <?php get_header();?>
    
    <div id="the-content">
    
    <div id="page_content">
    
    <div id="content">
    
            <?php query_posts('post_type=post&post_status=publish&posts_per_page=10&paged='. get_query_var('paged')); ?>
    
      <?php if( have_posts() ): ?>
    
            <?php while( have_posts() ): the_post(); ?>
    
          <div id="post-<?php get_the_ID(); ?>" <?php post_class(); ?>>
    		<div id="this-post">
    			<div class="post-date"><?php the_date(); ?></div>
    			<div class="post-comment"><?php comments_popup_link(__('0 comments','example'),__('1 comment','example'),__('% comments','example')); ?></div>
    		</div>
    		<div id="post-content">
              <div class="post-image"><?php the_post_thumbnail( array(200,220) ); ?></div>
    	<div class="post-title"><h2><?php the_title(); ?></h2></div>
    	 <div class="post-excerpt"><?php the_content(); ?></div>
    		</div>
          </div><!-- /#post-<?php get_the_ID(); ?> -->
    <div style="clear:both;"></div>
    
    <div class="comment-form">
    <?php comment_form(); ?>
    </div>
            <?php endwhile; ?>
      <?php else: ?>
      <?php endif; wp_reset_query(); ?>
    
      </div><!-- /#content -->
    </div><!--End the-content div-->
    <?php get_sidebar();?>
    </div>
    <?php get_footer();?>
    

    Nothing mentioned in functions.php

    please help me to solve this issue !

    – Thank You-

  • The topic ‘Why can't i see approved comments ?’ is closed to new replies.