1. First and foremost, go to the Functions.php file of the currently used theme of WordPress. Then copy the code below and paste it before the closing tag?> of the Functions.php file.

2. Then, copy the code below and paste it into single.php file in the while loop.

3. Next, copy the following code and paste it where you want to show the number of views

<div class=”densorstyle=””><?= gt_get_post_view(); ?></div>

4. When it’s all done, you will see the post view like this:

Share This

Share this post with your friends!