Results 1 to 8 of 8

Thread: showing the total number of posts

  1. #1
    Thread Starter
    Junior Member
    Not a Verified Customer
    wilson's Avatar
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    showing the total number of posts

    Hi

    is there a way to show the siteīs total number of posts?
    Wondering something like:
    Today:62548 posts!

    Regards

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,009
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts

    Re: showing the total number of posts

    There's a plugin for that and was posted in this forum somewhere. I'll post a link when I find it.
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    Junior Member
    Not a Verified Customer
    wilson's Avatar
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: showing the total number of posts

    Just a little bump

    After a search iīve found nothing...

    Thanks.

    If iīm not wrong there is a classipress native function for that, but as iīm not a coder I canīt be shure of that

  4. #4
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,009
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts

    Re: showing the total number of posts

    Here it is http://wordpress.org/extend/plugins/wordpress-totals/ .
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  5. #5
    Thread Starter
    Junior Member
    Not a Verified Customer
    wilson's Avatar
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: showing the total number of posts

    Hi Jomark

    many thanks for that great tip
    itīs working perfectly on my test install.

    I was playing with another plug but it was not working properly.
    The wordpress-totals just rocks!

    Thank you.

  6. #6
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Re: showing the total number of posts

    You can also edit the header.php file and uncomment three lines of code. I built it into the product and as an option for customers like you.

    Code:
    // show the total number of live ads. Uncomment when ready to use
    $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
    if (0 < $numposts) $numposts = number_format($numposts);
    echo $numposts;

  7. #7
    Thread Starter
    Junior Member
    Not a Verified Customer
    wilson's Avatar
    Join Date
    Sep 2009
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: showing the total number of posts

    Quote Originally Posted by dcowgill
    You can also edit the header.php file and uncomment three lines of code. I built it into the product and as an option for customers like you.

    Code:
    // show the total number of live ads. Uncomment when ready to use
    $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
    if (0 < $numposts) $numposts = number_format($numposts);
    echo $numposts;
    thanks dcowgill

    I already found It but, is that working nice to you?
    For me it returns an incorrect number of ads.

  8. #8
    Junior Member mlanghorst's Avatar
    Join Date
    Apr 2010
    Posts
    39
    Thanks
    3
    Thanked 2 Times in 2 Posts
    I'd suggest the following code. This code also includes the page count.

    <? // show the total number of live ads. Uncomment when ready to use
    $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post ' AND post_status = 'publish'");
    if (0 < $numposts) $numposts = number_format($numposts);
    echo $numposts ;
    ?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)