WordPress.org

Ready to get started?Download WordPress

Forums

Show comments on home page posts (14 posts)

  1. cip6791
    Member
    Posted 3 years ago #

    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.

  2. Hax
    Member
    Posted 3 years ago #

    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?

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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.

  4. terzap
    Member
    Posted 3 years ago #

    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.

  5. alexburner
    Member
    Posted 3 years ago #

    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

  6. jageo
    Member
    Posted 3 years ago #

    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

  7. Thedirthound
    Member
    Posted 3 years ago #

    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

  8. Thedirthound
    Member
    Posted 3 years ago #

    anyone able to help me? Love you all!!

  9. Thedirthound
    Member
    Posted 3 years ago #

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

  10. realtm
    Member
    Posted 3 years ago #

    @alchymyth

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

    Thanks!

  11. HNORTHWAY
    Member
    Posted 3 years ago #

    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

  12. HNORTHWAY
    Member
    Posted 3 years ago #

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

  13. whatachamp
    Member
    Posted 2 years ago #

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

  14. gesweb
    Member
    Posted 2 years ago #

    Thanks muchly for this :) Just what I needed x

Topic Closed

This topic has been closed to new replies.

About this Topic