Hey.
I want to have the comments of each post shown on the index page, so I searched around and found this:
<?php $withcomments = "1"; $comments_template; ?>
It's not working as it should, though. I can get the comments to show, but they are all the same no matter which post it is.
You can see for yourself here. Just click on "Visa kommentarer" beneath the post and they will appear.
hope you can help :)
Look at your theme's single.php template file. Find the code that displays the comments after the post content. Copy it and paste it into the index.php file in the same location, INSIDE THE LOOP. That is, before the closing ENDWHILE.
Make sure you make a backup copy of your index.php file before you change anything.
The only code that I can find in the single.php file that has something to do with the comments is <?php comments_template(); ?>. So not much help there, I'm afraid, as I've already included that in my index.php file. And it's inside the loop.
That generally is what is needed to display comments. That's all the help I can offer with the information you've provided.
Anyone else got any ideas? It's driving me crazy :/
Finally got it working. I just passed two arguments to the comments function, like this: <?php comments_template('/comments.php', true); ?>