The MU forums have moved to WordPress.org

MU Sitewide Blog, Post, and Word Counts (9 posts)

  1. Gaboinked
    Member
    Posted 15 years ago #

    Hello,

    I am desperately needing to display total blogs, new post, and total words (not unnecessarily by day, but may need to be an option).

    Can anyone guide me in a direction to construct a set of queries that will output each of the following as seen on wordpress.com?

    4,053,071 total blogs, 140,258 new posts, 44,153,844 words today.

    Thanks
    Gaboinked!

  2. Klark0
    Member
    Posted 15 years ago #

    This will give you total blogs and users.
    If you want to do the "new posts today", you need a premium plugin called blog activity which is able to display # of posts and comments in selected timeframe. 1day, 1month, etc.

    <?php
        $stats = get_sitestats();
        echo " ".$stats[ 'blogs' ]." totals blogs and ".$stats[ 'users' ]." users. ";
    ?>

    For wordcount, I dunno :D

  3. Gaboinked
    Member
    Posted 15 years ago #

    Klarko, very much appreciated. Am I assuming correctly that '$stats = get_sitestats();' function only calls these 2?

  4. tdjcbe
    Member
    Posted 15 years ago #

    You can find the code with the wp-includes/wpmu-functions.php file for reference. About 65 lines in.

    Looks like it just will output the blog and users counts.

  5. 1stAngel
    Member
    Posted 15 years ago #

    Thank you so much for this!

  6. Klark0
    Member
    Posted 15 years ago #

    An idea for wordcount, you can use the Sitewide Tags plugin to copy all posts to the main blog. Then search wordpress.org/extend for a plugin that will count words and activate it on the main blog.

  7. tdjcbe
    Member
    Posted 15 years ago #

    Just to throw this in since we're talking about this elsewhere but 1) how have you configured Sitewide tags to use blog #1 (I'm assuming that you're either modifying the site_option manually to point at blog #1 or the "What blog to use" field is just blank) and #2 how are you keeping the posts separate from the contents of the main blog?

    Thanks

  8. Klark0
    Member
    Posted 15 years ago #

    I don't use the mainblog for posting. I got separate blogs for support and news. wp.com does the same thing.

    The newer version of sitewide tags has a checkbox for mainblog. Just leave the blogname field as is.

  9. tdjcbe
    Member
    Posted 15 years ago #

    The newer version of sitewide tags has a checkbox for mainblog.

    It does?....

    Shows you how much I pay attention.

    Thanks for that.

About this Topic

  • Started 15 years ago by Gaboinked
  • Latest reply from tdjcbe