• dennis8

    (@dennis8)


    I would like to display comments on category pages. 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:

    [code moderated as per forum rules - please use the pastebin]

    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...'); ?>):

    [dito]

    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!

    `

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dennis8

    (@dennis8)

    Ok, let me paste only the viral part of the code. In the original index.php it says:

    [please mark your code using the (guess …) ‘code’ button – not blockquote; otherwise the code will get corrupted.]

    <div class="post-entry">
    <?php the_content('Read more...'); ?>
    </div>
    <div class="post-info">
    <?php comments_popup_link('Comments (0)', 'Comment (1)', 'Comments (%)'); ?> : <a>#respond">Add Comment</a>
    </div>

    I changed it to:

    <div class="post-entry">
    <?php the_content('Read more...'); ?>
    <?php edit_post_link('Edit this entry.','',''); ?>
    <?php comments_template(); ?>
    </div>

    Thanks!

    Michael

    (@alchymyth)

    there are many good reasons why wordpress does not allow/show comments on multi-post pages as default;
    however if you want to ‘force’ it at your own peril, try:

    <?php global $withcomments; $withcomments = 1; comments_template(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display comments in categories?’ is closed to new replies.