DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Are you using the powerful “Multisite” WordPress feature? If yes, you may find useful to be able to display some information about your blog network: Network name, number of blogs and users… Here’s a ready to use function for your blog network.

To display information about your network, simply paste the following piece of code where you want the info to be shown, for example in your theme footer.

<?php if( is_multisite() ): ?>

   The <a href="<?php echo esc_url( get_site_option( 'siteurl' ) ); ?>"><?php echo esc_html( get_site_option( 'site_name' ) ); ?> network</a> currently powers <strong><?php echo get_blog_count(); ?></strong> websites and <strong><?php echo get_user_count(); ?></strong> users.

<?php endif; ?>

Once you saved the file, your blog network name as well as the user/blogs count will be displayed.

Thanks to Kevin Leary for the cool tip!


One Comment

  1. nice recipe, but why oh why is it not localized? Last time I checked we’re nearing 2012…

Leave a Comment

Your email address will not be published. Required fields are marked *