I want the comments and comment submission form (or the "you must be logged in" message) to appear below each post on my index page.
It's working fine on single.php, when displaying a single page, but what appears to me to be the exact same code doesn't work in index.php.
single.php:
<?php get_header();?>
<?php get_sidebar();?>
<div id="main">
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<div class="box">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="post-content">
<?php the_content("Continue Reading »"); ?>
<?php wp_link_pages(); ?>
<!--
<?php trackback_rdf(); ?>
-->
</div>
<p class="bottom">
<span class="cat"><?php the_category(' &');?></span>
<span class="user"><?php the_author(); ?></span>
<span class="date"><?php the_time('d M Y'); ?></span>
<span class="comments"><?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments')); ?></span><?php edit_post_link('edit this'); ?>
</p>
</div>
<?php comments_template(); ?>
<?php endforeach; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<p align="center"><?php posts_nav_link() ?></p>
</div>
</div> <!-- close content -->
<?php get_footer();?>
index.php:
<?php get_header();?>
<?php get_sidebar();?>
<div id="main">
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<div class="box">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="post-content">
<?php the_content("Continue Reading »"); ?>
<?php wp_link_pages(); ?>
<!--
<?php trackback_rdf(); ?>
-->
</div>
<p class="bottom">
<span class="cat"><?php the_category(' &');?></span>
<span class="user"><?php the_author(); ?></span>
<span class="date"><?php the_time('d M Y'); ?></span>
<span class="comments"><?php comments_popup_link(__('No Comments'), __('1 Comment'), __('% Comments')); ?></span><?php edit_post_link('edit this'); ?>
</p>
</div>
<?php comments_template(); ?>
<?php endforeach; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<p align="center"><?php posts_nav_link() ?></p>
</div>
</div> <!-- close content -->
<?php get_footer();?>
The only difference I can see between these two pages, is 'comments_number' in single and 'comments_popup_link' in index, and changing it to 'comments_number' in index.php has no effect.
For the life of me, I can't figure out why I can't get the comments and reply form to show up on the index page. Am I overlooking a setting somewhere? I've been through all the admin pages and can't find an option that enables/disables comments on the index page.
Help, please?