How to show post views count in WordPress

How to

This is the tutorial of How to show post views count in WordPress. The Plugin I want to introduce to you is Post Views Counter developed by dFactory. This plugin is one of the most used plugins that helps count post views in WordPress. Currently, it has more than 1,00,000 active installations. That’s an amazing number. You don’t need to pay anything to get this plugin because it is completely FREE and users can download it from their homepage.

It allows you to display how many times a post, a page or any custom post type had been viewed in a simple, fast and reliable way. It is compatible with WordPress version 4.0 or higher. The plugin is easy to install and use giving users the best experience with very little effort from you as an admin.

Features include:

  • Free and open source
  • 2 methods of collecting post views data: PHP and Javascript
  • Option to select post types for which post views will be counted
  • Option to select page types for which page views will be counted
  • Enable to display post view count column for each of the selected post types
  • Option to set time between counts
  • Display views for each user type (logged in users, guests, selected user roles)
  • Exclude views for each type of visitors (robots, logged in users, guests, selected user roles)
  • Multiple post views position

To get this Post Views Counter, please check it here.

How to count post views in WordPress using Post Views Counter plugin

Step 1:

First of all, as usual, you need to install and activate the Post Views Counter plugin. Click on the button Download on the left of the screen and wait for this plugin to download. After that install it.

Step 2:

Next, move to Settings => Post Views Counter. Here, you will see the setup interface consisting of 2 tabs: General and Display. Start with, the General tab, you can set up it as below.

How to

The General tab includes:

  • Post Types Count: select the type of page you want to display the view counter (pages or posts)
  • Counter Mode: counting method, by PHP or JavaScript
  • Post Views Column: add a column that displays the number of views into the posts admin interface, page
  • Restrict Edit: limits the right to set a view counter (only Admin has permission)
  • Time Between Counts: enter the interval between 2 times to a user’s visit. You should leave it to 0
  • Reset Data Interval: Time to store counter data before being reset. You should leave it to 0
  • Flush Object Cache Interval: length of time to delete object cache. You should leave it to 0
  • Exclude IPs: don’t count visits from certain IPs
  • WP-Post Views: import counter data from the WP-PostViews plugin
  • Deactivation: enable to delete all plugin data when disabling the plugin

After that click the Save Changes button to save.

Step 3:

Switch to the Display tab. You can set up it as below.

How to

The Display tab has the following options:

  • Post Views Label: label for the counter.
  • Post Type: the type of article you want to display the counter.
  • Page Type: the type of page you want to display the counter.
  • User Type: the type of user you want to count the number of article views.
  • Position: the position of the counter display. You can choose at the beginning, at the end of the article or manually insert using shortcode.
  • Display Style: display style. You can choose to display both the icon and the counter’s label or choose according to your preferences.
  • Icon Class: select the icon code for the counter. This counter uses the default Dashicon font of WordPress.

Click the Save Changes button to save it after you finished.

Step 4:

When you’ve done, this is what you will get:

How to

Conclusion

For anyone who doesn’t want to use code to display the number of views of blog posts or pages in WordPress, they can easily use Post View Counter plugin. So, with just a few click setup, you can easily see the views on the posts or pages you want. We hope that this article helps you with your mission to display post views on your site. Thank you for reading.

Leave a Reply

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