In this article, you will discover how to show the total number of post views on your WordPress website. Using Simple Post Views Plugin, you are ready to automatically show post views on the frontend to your visitors. The procedure requires some editing in your “single.php file” in order to ensure that everything goes as expected.
ut never worry since I am going to share with you from the start to the end of the entire process. WordPress is known to be one of the best and leading Blogging platforms which don’t require detailed configurations and nor requiring one to first study all about the technical and programming knowledge since it runs on a what you post is what you see platform just like how Blogger, Joomla and others do.
After trying the different plugins which are all about showing post views on WordPress and failing in addition to trying the no plugin configuration and failing, I found out Simple Post Views Counter and which I tried, found to be working(not sure if others failed due to my template or any other reason)and that is why I am sharing with you how it works and what you need to do in order to start showing the total number of views any of your WordPress site article has received just like you can see the number of hits this post has received just next to the posted date in the meta line above.
If you are one of those who are like how I used to be – searching for a way to show the views but in a professional look, just keep reading since in the next few lines, you will get to know and learn what I am soon to share.
How To Get Started?
Getting on board is so simple and requires you to have a WordPress site running on a self host plan other than a free hosted WordPress.com sub domain. You can do that by migrating your free site to a hosted one and or to upgrade from the free to a paid plan. And once you are done, you will need to have the Simple Post Views Counter plugin installed on your site.
Getting The Simple Post Views Plugin
Just login to your WordPress site administration end, to plugins and add new. Search for Simple Post Views, install it and activate it.
Configuring / Editing Your Single.php file
Before you attempt to edit your single.php file, it is recommended that you do a full site back up and too the single.php file back for protection purposes just in case you need to roll back. When you are done, locate this line below using CTRL + F;
And then, look out for this below still using CTRL + F still before the closing meta-entry tag;
Now paste this line below before the above div tag and save file when done.
| <?php echo_views(get_the_ID()); ?> Total Views
Now open one of your post pages and check if you can see the Total number of view and if you are the first visitor, you will see 1 Total Views. In case you see an error for example your post content not loading, make sure that you have activated the Plugin since failure to do so will mean the error arising. You can additionally check out the Plugin read me text for details.
Liked this article or found it helpful? Share it with your friends using the social share buttons below and or post a comment to let us know your feedback or any addition using the comment form below..