• Hi there,

    I’ve made my wordpress theme and made a custom loop for showing my content however, I cannot get comments displaying, I’m sure it must be something simple that I have overlooked. The code is as follows:

    <?php if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>
    
        <div class="content">
            	<div class="contenttopbottom">
    			<?php the_time('F jS, Y') ?> by <?php the_author() ?>
                <div class="comments">
    			<?php comments_popup_link('No Comments ?', '1 Comment ?', '% Comments ?'); ?></div>
                </div>
    
                <h1><?php the_title(); ?></h1>
                <?php the_content(''); ?>
    
                <div class="contenttopbottom">
    				<?php if( strpos( $post->post_content , "<!--more-->" ) != false ) { ?>
    				<a href="<?php the_permalink(); ?>">Read more</a>
                    <?php } ?>
    			</div>
    
        <?php comments_template(); // Get wp-comments.php template ?>
        	</div>
    
    <?php endwhile;?>
    
    <?php else : ?>
    
    <?php endif; ?>

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Comments not displaying, can’t work out why!’ is closed to new replies.