Do you want to show stats like 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?
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.
Having said that, let’s take a look at how to easily show simple blog stats on your WordPress site.
If you don’t like the video or need more instructions, then continue reading.
Adding Simple Blog Stats in WordPress
Upon activation, you need to visit Settings » Simple Blog Stats to configure plugin settings.
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.
You can also show specific stats like 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.
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:
You can then use the
.sbs-count-comments class to add custom CSS styles of your own. You can also change the
<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
[sbs_blog_stats]displays 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 total number of comments or 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. You may also want to see our list of 7 best analytics solutions for WordPress users.