blogstats
How to Show Simple Blog Stats on Your WordPress Site
November 5th, 2018 in Wordpress |

Do you want to show stats like the total number of posts, comments, registered users, etc to users on your site? In this article, we will show you how to show simple blog stats on your WordPress site.

Why Show Blog Stats on Your WordPress Site?

Building an online community can be a bit difficult for new websites. Getting more traffic and increasing time users spend on your website requires effort and patience.

Simple blog stats like the number of registered users, posts, and comments can show other users that your site is growing fast. It encourages user engagement and builds trust.

It also allows you to easily monitor your site’s growth and plan strategy. For example, if your comments are low, then you can try to get more comments on your posts. If you allow user registration, then you can do more to encourage more users to register.

Adding Simple Blog Stats in WordPress

The first thing you need to do is install and activate the Simple Blog Stats plugin.

Upon activation, you need to visit Settings » Simple Blog Stats to configure plugin settings.

simpleblogstats-1

Simple Blog Stats allows you to add blog stats using shortcodes and template tags.

You can display all the stats by adding a single shortcode [sbs_blog_stats]in a post, page, or a sidebar widget. It will display a list of all your blog stats.

allblogstats

You can also show specific stats like the total number of posts by using different shortcodes.

Click on the shortcodes tab to expand it, and you will see the complete list of shortcodes you can use.

sbs-shortcodes

Each shortcode has a description below it which explains what information it will show. You will also see two text fields containing the HTML it will add before and after the information.

For example, using the shortcode [sbs_comments] will output this HTML:

<span class="sbs-count-comments">135</span>

You can then use the .sbs-count-comments class to add custom CSS styles of your own. You can also change them <span class="sbs-count-comments"> </span> to anything you want.

Don’t forget to click on the save settings button to store your changes.

Here is a list of shortcodes offered by the plugin with description.

    • [sbs_posts] displays total number of posts on your site.
    • [sbs_pages] displays total number of pages on your site.
    • [sbs_drafts] shows total number of drafts on your site.
    • [sbs_comments] shows Total number of comments including those approved and those pending approval.
    • [sbs_moderated] shows number of comments in pending approval.
    • [sbs_approved] shows number of approved comments.
    • [sbs_users] displays total number of registered users on your site
    • [sbs_cats] shows total number of categories
    • [sbs_tags] shows total number of tags.
    • [sbs_updated] shows last updated date and time
    • [sbs_latest_posts] shows latest post

[sbs_latest_comments]

     shows latest comments displays

  • [sbs_blog_stats] all blog stats in a bulleted list.

Some of the shortcodes may display information that you probably don’t want to show like number of drafts, comments pending approval, number of categories and tags.

But you can still create a list of blog stats using individual shortcodes. These shortcodes also come in handy when you just want to show specific stats like the total number of comments or the total number of users on your WordPress site.

That’s all, we hope this article helped you learn how to show simple blog stats on your WordPress site.