Support » Themes and Templates » comments directly under post – everytime

  • Hi,

    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.


Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘comments directly under post – everytime’ is closed to new replies.