Home » WordPress » Views Count for WordPress Post Page Without Plugin

Views Count for WordPress Post Page Without Plugin

In this article, we going to do views count for WordPress post page without a plugin. Based on the postID here, we going to count the post views every time the user visits the post. This function will work under the post visits based, then using IF condition we going to use operator count++ to increase the post views count. By doing without plugin that helps us to maintain our website performance in good health.

Use the below code in your functions.php file.

Once you add the above code now set the post views in single.php post loop.

The final step to display the no of Post views, for that use the below code in single.php template wherever in the loop you like to display the post views count.


I hope this article will help you to do the views count for your WordPress post page. If you have any doubts let me know in the comment section and if you love this article share it with your friends.

Was this article helpful?

Yes No

How can we improve it?


We appreciate your helpul feedback!

Your answer will be used to improve our content. The more feedback you give us, the better our pages can be.

Follow us on social media:

Facebook Pinterest


Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts.

One thought on “Views Count for WordPress Post Page Without Plugin

Leave a Reply

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

Back to top