comments directly under post - everytime (3 posts)

  1. tobsen
    Posted 10 years ago #


    I would like to see the comments to a post directly under the post, even in the "list"-view, where I can see 10 posts or so.
    At the moment I have to click to "comments (x)" on everey post, thats not very useful.

    PS: our blog is a internal tech-blog for "virtual meeting". so other members put there perception to the post in the comments, and they are usually as important as the post itself.


  2. Kafkaesqui

    Posted 10 years ago #

    In your theme's index.php template, change the call to comments_template() to this (or add if it doesn't exist):

    $wp_query->is_single = true;
    $wp_query->is_single = false;

    This temporarily sets the template/page query type to single. The comments_template() function tests on this to decide if the comments template should be included, so we're fooling it here.

    You'll probably want to remove the comments_popup_link() template tag as well (or comments_link()), which is what displays your comments (N) link.

  3. tobsen
    Posted 10 years ago #

    I played a little bit with the position of the function, but at the end it works quit fine.
    That's what I was looking for, big THANKS!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.