WordPress.org

Ready to get started?Download WordPress

Forums

Can't get the number of comments to show on the front page... (8 posts)

  1. LindseyatBackpackerDaily
    Member
    Posted 4 years ago #

    I am using the Magazine Basic theme, and I can't seem to get the number of comments to appear on my front page. Since each post is long, I have a picture with the first few sentences posted on the front page of the site. Of course, if you click on the article, a reader would be able to see the whole thing...including the number of comments and what each person said.

    On the homepage, (the page with the first few sentences of each article,) I can't get the number of comments to show up. It says, "read more," but it doesn't say anything like "3 comments" or "no comments yet." How can I get it to say things like that???

  2. Samuel B
    moderator
    Posted 4 years ago #

    here is some example code - put it after the 'read more" </div> in your theme's index.php or home.php if that is what is used for front page.

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

  3. niijii
    Member
    Posted 4 years ago #

    Lindsey, what file did you add the code to? I could not see it in the index.php. The front page on your site looks just like what I'm looking for.

  4. NASAWebbTelescope
    Member
    Posted 4 years ago #

    This worked perfectly, thank you! FYI, I added it to the index.php page of my theme where the tags, category and post author were displayed, which was at the bottom of the entry below "read more". I did remove the >> because it displayed funny. Thanks for posting the example code, it was very helpful!

  5. jeh3404
    Member
    Posted 4 years ago #

    This works great, but I get a symbol after the comments link. In IE, it is just a blank square outline. In Firefox, it looks like a diamond with a question mark inside. Is there any way to remove that?
    http://www6.gennextstl.org/
    Thanks.

  6. jeh3404
    Member
    Posted 4 years ago #

  7. HorrorUK
    Member
    Posted 4 years ago #

    Just remove the >>

  8. janleeks
    Member
    Posted 4 years ago #

    Exactly what I needed -ta

Topic Closed

This topic has been closed to new replies.

About this Topic