I would like to display comments on category pages (wordpress blog). Currently my categories show 3 posts in full - except for the comments. It only gives the option to add comments and show how many comments have been left. I know this is the default. But how do I change it?
I figure I only need to tweak the index.php? First of all here's the original code from my theme:
Quote:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<!-- Content -->
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<!-- Post -->
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post-date"><?php the_time('F d, Y') ?></div>
<div class="post-title" style="text-align: center;">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="post-title-info">Posted by: <?php the_author() ?> : Category: <?php the_category(', ') ?></div>
<div class="clear"></div>
</div>
<div class="post-entry">
<?php the_content('Read more...'); ?>
</div>
<div class="post-info">
<?php comments_popup_link('Comments (0)', 'Comment (1)', 'Comments (%)'); ?> : <a href="<?php the_permalink() ?>#respond">Add Comment</a>
</div>
</div>
<!-- /Post -->
<?php endwhile; ?>
<!-- Navigation -->
<div class="navigation">
<div class="navigation-previous"><?php next_posts_link('« Previous Entries') ?></div>
<div class="navigation-next"><?php previous_posts_link('Next Entries »') ?></div>
</div>
<!-- /Navigation -->
<?php else : ?>
<!-- Post -->
<div class="post">
<div class="post-title">
<h2>Not Found</h2>
</div>
<div class="post-entry">
<p>Sorry, but you are looking for something that isn't here.</p>
</div>
</div>
<!-- /Post -->
<?php endif; ?>
<div class="clear"></div>
</div>
<!-- /Content -->
<?php include (TEMPLATEPATH . '/sidebar-right.php'); ?>
<?php get_footer(); ?>
|
Simply going by the code of the single.php I deleted the comment pop up part and replaced it with this (right under <?php the_content('Read more...'); ?>):
Quote:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<!-- Content -->
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<!-- Post -->
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post-date"><?php the_time('F d, Y') ?></div>
<div class="post-title" style="text-align: center;">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="post-title-info">Posted by: <?php the_author() ?> : Category: <?php the_category(', ') ?></div>
<div class="clear"></div>
</div>
<div class="post-entry">
<?php the_content('Read more...'); ?>
<?php edit_post_link('Edit this entry.','',''); ?>
<?php comments_template(); ?>
</div>
</div>
<!-- /Post -->
<?php endwhile; ?>
<!-- Navigation -->
<div class="navigation">
<div class="navigation-previous"><?php next_posts_link('« Previous Entries') ?></div>
<div class="navigation-next"><?php previous_posts_link('Next Entries »') ?></div>
</div>
<!-- /Navigation -->
<?php else : ?>
<!-- Post -->
<div class="post">
<div class="post-title">
<h2>Not Found</h2>
</div>
<div class="post-entry">
<p>Sorry, but you are looking for something that isn't here.</p>
</div>
</div>
<!-- /Post -->
<?php endif; ?>
<div class="clear"></div>
</div>
<!-- /Content -->
<?php include (TEMPLATEPATH . '/sidebar-right.php'); ?>
<?php get_footer(); ?>
|
Well, this doesnt work. The funny thing is that the added "edit this entry" function does show on the categories now but the comments dont. Of course it also doesnt show the pop up option anymore just like I wanted it. So what am I missing? Is there something else in wordpress or my theme that may be suppressing the comments display on categories? I cant seem to find anything in the index.php, comments.php or functions.php that may lead to that conclusion. But maybe its something else? Also, Ive tried to find a plugin that would do this but no luck...does anyone know of one? Like an enhanced category or comments plugin. Thanks for any help!
__________________
«An interesting journey never follows a straight path» — Marjan van den Belt
Check out my Please login or register to view this content. Registration is FREE Blog.
|