I am displaying WP comments on homepage in my index.php file, but the problem I have is that some comments are displayed under each post. The comment number is okay, but the comments are assigned wrong to the post. However when displaying the single page, everything is okay.

I checked the IDs of the comments in the DB and it seems to be okay too.

Any ideas what's going on?

I am using the following code in my index.php to display the comments:

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

Here is the whole index.php and if it helps here is the actual page.

See for example the comment on the latest post from "Linda Walker", it is displayed under each post :-/

P.S. The posts were originally imported from MovableType, I hope it has nothing with that as I used the official import plugin.


1 Answer 1


Seems I fixed it myself, I had to call

<?php global $withcomments; $withcomments = 1; comments_template('/comments.php', true); ?>

as I am filtering comments by type:

<?php wp_list_comments('type=comment&callback=jennygg_comment'); ?> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.