Support » Plugins and Hacks » Are there any tags to show total posts and comment

  • Resolved Anonymous

    Hi
    I would love to be able to show total posts and total comments like;
    ‘View all 500 posts’ and ‘there are 10 comments’
    Are there any tags that do this?
    Thanks
    Karl

Viewing 7 replies - 1 through 7 (of 7 total)
  • Do you want them to have a link so that when you click on them it shows ALL of your posts or ALL of you comments? Or do you simple want something to count the number of posts and number of comments and display a statistic?

    I have a couple of functions on my site that I use for stats. See my hacks at http://mtdewvirus.com/wp-hacks/

    Wicked!
    Thanks for that 🙂
    Karl

    Karl,
    Check the new function out. 😉
    comments_popup_link counts the number of comments for a post, but returns it as a link. I’m assuming you wanted what I came up with, just a text count of the comments.
    -Nick

    Hi Nick,
    Yes thats is correct Sir! 🙂
    Your function works fine – I didn’t read the label properly 🙂
    I wondered though if there is a way to say ‘No comment’, 1 comment etc.
    T ried this in the brackets of your function but it didn’t work.
    ‘Want to reply?’, ‘1 Comment’, ‘% Comments’
    Thanks
    Karl

    From what you say now, it sounds like you want this to be a link, which then shows the comments section of the post. You should be using comments_popup_link (which does’t actually create a popup if popup comments are turned off) for this. Take a look at my site…is that how you want it?
    If so, do this: comments_popup_link(‘Want to reply?’, ‘1 Comment’, ‘% Comments’) where you call this function.

    Here is a plugin that will display the total number of blog posts, comments, categories, or any combination thereof:
    BlogStats PCC

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Are there any tags to show total posts and comment’ is closed to new replies.