How to add post views counter in wordpress?


show post visitor

If you install the default theme in wordpress. Generally there have no option to show your post views data counter. But it is very important to know how much times your page reloaded by the viewers. So anyone can guess the popularity of the topics and you can write more custom function by using the counter data. Here following a short but effective tutorial about that. In this tutorial i will show you, hwo can you add post views data counter in any wordpress theme by custom functions.

At first open your wordpress theme where you want to show the post views data counter. Then open functions.php in any editor such as like notepad++, sublime text 2, Dreamweaver. You may open functions.php from wordpress admin panel too for editing there.

Now follow the bellows step :


Now Show the HTML data in your single.php or any other pages by using following code :


You will get output as 0 view, 1 view, 2 views, 3 views etc.

If you face any problem to useĀ  above codeĀ  feel free comment bellow. I am always happy to reply you.


About Author

I have no more personal information to share with you but have enough experience to share with all. I am always funny