kvdmolen
Member
Posted 3 years ago #
Hi,
I would like to display multiple posts on one page, but then including comments. I tried to use
wp_list_comments();
on the index-page, but no comments are shown. I guess because the function doesn't know the current post? (wp_list_comments($postID); doesn't seem to work either..) How do I show the comments for a specific post ID?
Thanks!
Klaas
Hi
The template that currently displays comments on the single post page is
/wp-content/themes/{themename}/single.php
Open that file in an editor. Find the code that displays the comments. Copy it. If its your posts page you want the comments displaying on, paste it into the corresponding place in index.php. For this to work you must paste it WITHIN the WordPress loop, before the closing endwhile. Then comments will display after each post.
Be sure to make a copy of index.php before you change anything, so you can revert if you have problems.
arrowebs
Member
Posted 2 years ago #
This did not work for me.
The only thing that I see here is comments_template(); But that doesn't get it. I guess it has to do something with making it a single post but not sure.
Help appreciated.