• Inazuma

    (@inazuma)


    Hi,
    I plan to create a web site for my game mod team, but I don’t want a forum. I plan to have a sub page structure, so eg.
    -Projects
    –For Age of Empires 3
    —The Adventures of Captain Columbus project
    —The Lord of the Rings mod
    etc

    I want people to comment on these pages rather than in a forum and so I figured a sitemap would be best suited to be used instead of the forum structure.

    Now all I want to know is how do I get the number of comments to show up next to each page?
    eg.
    —The Lord of the Rings mod (24 comments)

Viewing 4 replies - 1 through 4 (of 4 total)
  • t31os

    (@t31os)

    The same way you’d do it inside a normal loop.
    Assuming you’re inside a loop of posts…

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

    Would display, No comments, 1 comment, or X comments, where X is a number…

    You could just have the number….
    <?php comments_popup_link('0', '1;', '%');?>

    Unless i’m having a blonde moment, i think it’s that easy…. 🙂

    Thread Starter Inazuma

    (@inazuma)

    I’d like the number of comments to show up on an external page though. Ie. A site map page where each page link has its number of comments displayed next to it.

    t31os

    (@t31os)

    Why don’t you use a WordPress page/post for the sitemap?

    Rather then having an external page and having to hook into WordPress.

    Thread Starter Inazuma

    (@inazuma)

    Sorry – by external page, I meant external from the individual pages that I want comment counts from. So yes I want the ‘external page’ to be a wordpress post/page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sitemap that displays number of comments’ is closed to new replies.