Show comments on main index page
-
Hi,
I am trying to show comments underneath each post on the main index page of my blog.
Searching the forum shows that i should put <?php comments_template(); ?> in my code before <?php endwhile; ?>
.I have tried doing this and it is not working. Any ideas?
My index code is below.
Thanks.
‘<?php get_header();?>
<?php get_sidebar();?>
<div id=”content”>
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<h1>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h1><div class=”entry”>
<?php the_content(); ?>
</div><div class=”postmetadata”><?php the_tags(‘Tags: ‘, ‘, ‘, ‘
‘); ?> Posted in <?php the_category(‘, ‘) ?> on <?php the_time(‘F j, Y’) ?> <!– | by <?php the_author() ?> –>| <?php edit_post_link(‘Edit’, ”, ‘ | ‘); ?> There are currently <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?></div></div>
<?php endwhile; ?>
<div class=”navigation”>
<div class=”alignleft”><?php next_posts_link(‘« Older Entries’) ?></div>
<div class=”alignright”><?php previous_posts_link(‘Newer Entries »’) ?></div>
</div><?php else : ?>
<h2 class=”center”>Not Found</h2>
<p class=”center”>Sorry, but you are looking for something that isn’t here.</p>
<?php include (TEMPLATEPATH . “/searchform.php”); ?><?php endif; ?>
</div>
<?php get_footer ();?></body>
</html>’
- The topic ‘Show comments on main index page’ is closed to new replies.