WordPress.org

Support

Support » Plugins and Hacks » Show comments on home page posts

Show comments on home page posts

  • cip6791
    Participant

    @cip6791

    Hi,

    I have 3 posts showing on the home page. I would like to add comments on each of the posts. Maybe something without refreshing the page. Any information will be appreciated.

    Thank you.

Viewing 13 replies - 1 through 13 (of 13 total)
  • what do you mean by showing comments on each of the post, do you mean comment count? if you want to show the comment count you can use this code on your theme

    <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>

    or are you looking for something different?

    Michael
    Forum Moderator

    @alchymyth

    on the home page, you may have to use something like:

    <?php
    $withcomments = 1; // force comments form and comments to show on front page
    comments_template();
    ?>

    to show the comments input form and comments.

    Thanks for this— came in handy just today. Lots of users don’t want to click more than once and it’s nice they can see what’s already commented right below the post.

    alexburner
    Member

    @alexburner

    ALCYMYTH YOU JUST SAVED MY LIFE

    i’ve been wandering the forums and the internets for a while trying to figure out how to display comments on index.php. and it was just one little variable!

    thank you so much for the wisdom

    I too have been wandering for HOURS and trying what feels like a zillion different functions.
    $withcommnents = 1; is exactly what I needed
    If it helps any future searches find this post I’m trying to display a list of comments for just one category

    Thedirthound
    Member

    @thedirthound

    Where do I insert this code to get it to work please, I am a newbie!! Which index.php file and where at in the file

    Thanks a bunch

    Thedirthound
    Member

    @thedirthound

    anyone able to help me? Love you all!!

    Thedirthound
    Member

    @thedirthound

    Please help!! LOL my wife is on my A** to get this site done!!

    @alchymyth

    Bloody Hell, thank you so much! The $withcomments = 1; is what I was missing. Where did you find that?

    Thanks!

    HNORTHWAY
    Member

    @hnorthway

    OMGosh this was exactly what i needed. Only problem, where is the code for making the height auto…it’s all overlapping bc it’s only as high as the post and not making any room for the comments

    HNORTHWAY
    Member

    @hnorthway

    just noticed that my only issue is in safari. any helpful hints?

    whatachamp
    Participant

    @whatachamp

    Thanks alchymyth, I’ve been looking for that everywhere.

    Thanks muchly for this 🙂 Just what I needed x

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Show comments on home page posts’ is closed to new replies.