Divi: the easiest WordPress theme to use
Divi: The best WordPress theme of all time!
With over 901.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]
Do you want to display statistics like the total number of articles, the number of comments, the users registered on your site? In this tutorial, we will show you how to display simple statistics on your WordPress site.
Why display your WordPress blog statistics?
Building an online community can be a bit difficult for new sites. Getting more traffic and for more and more users to spend time on your site requires effort and patience.
Simple statistics like the number of registered users, articles and comments can show other users that your site is growing rapidly. It encourages user participation and builds confidence.
It also allows you to easily control the growth strategy and plan of your site. For example, if your comments are low then you might try to get more comments on your articles. If you allow user registration, then you can do more to further encourage users to register.
That said, we will show you how to display statistics on your WordPress blog.
How to add simple statistics to WordPress
The first thing you need to do is to install and activate the plugin " Simple Blog Stats ". For more details, see our step by step guide on how to install a WordPress plugin.
After activating the plugin, you must visit " Settings - Simple Blog Stats To configure the plugin settings.
Easily create your website with Elementor
Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]
« Simple Blog Stats Allows you to add statistics to your blog using shortcodes and template tags.
You can display all statistics by adding a single [sbs_blog_stats] shortcode in an article, page or sidebar unwidget. It will display a list of all the statistics of your blog.
You can also view specific statistics as the total number of items using different shortcodes.
Click on the shortcodes tab to expand it, and you will see the full list of shortcodes that you can use.
Each shortcode has a description below, which explains the different information it will display. You will also see two text fields containing the HTML code, which will be added before and after the information.
For example, using the shortcode [sbs_comments] this HTML code will be displayed:
You can then use the .sbs-count-comments class to add any custom CSS code of your choice. You can also change the HTLM code for whatever you want.
Do not forget to click the Save Settings button to save your changes.
Here is a list of shortcodes provided by the plugin with the description.
- [Sbs_posts] displays the total number of articles on your site.
- [Sbs_pages] displays the total number of pages on your site.
- [Sbs_drafts] displays the total number of projects on your site.
- [sbs_comments] displays the total number of comments, including those approved and those pending approval.
- [sbs_moderated] displays number of comments pending approval.
- [sbs_approved] displays the number of approved comments.
- [sbs_users] displays the total number of registered users on your site
- [sbs_cats] displays the total number of categories
- [sbs_tags] displays the total number of labels.
- [sbs_updated] displays the last update date and time
- [Sbs_latest_posts] shows the last article
- [Sbs_latest_comments] shows the last comments
- [sbs_blog_stats] displays all blog statistics in a bulleted list.
Some of the shortcodes may show information that you probably don't want to show, like number of projects, comments pending approval, number of categories and tags.
But you can still build a blog stats list using individual shortcodes. These shortcodes will also be useful when you just want to display specific statistics like the total number of comments or the total number of users on your WordPress site.
That's it for this tutorial. I hope it will allow you to post statistics information on your WordPress blog. Do not hesitate to contact us in case of problems.