WordPress tip: Display informations about your multisite install

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!

Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!

WordPress tip: Display informations about your multisite install

Leave a Reply

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