When enabled, the view counter will show up after the content of your posts. It looks like this:
This serves as a form of social proof to let visitors know how many others are reading your content. It can also be helpful if you sell advertising services and want potential clients to see what kind of reach they can expect.
It’s not enabled by default, so the first step is to turn it on.
How to display the view counter
Enabling the view counter is very easy.
Start by visiting the Settings menu and scroll down to the Public View Counter section.
To enable the counter, all you have to do is check the first box and click the Save settings button.
Once this is complete, the view counter will show up after the content of all your posts, styled the same way as pictured in the screenshot at the beginning of this tutorial.
Choose the post type
By default, the view counter only displays on your posts, but you can quickly enable it on any of your page types.
For example, if you check the Pages box, it will show up after the content of every page on your site. If you have any custom post types, they’ll display here as well.
Change the location
The view counter displays after the content, but you can also display it before the content or both before and after.
Exclude individual pages
You can remove the counter from an individual post/page by entering its ID into this input:
For example, you could show the view counter on all of your pages except for your homepage by enabling the Pages post type and then entering the homepage’s ID here.
You can follow this brief tutorial if you don’t know how to find the ID of a page: how to find a page’s ID.
Edit the label & icon
If you want to change the text that appears before the count (Views:), you can do so via the label input. And if you’d prefer not to show the small chart icon, that can be removed by unchecking the Show the icon box.
The last thing you’ll want to know about is how to use the shortcode.
How to use the shortcode
There are times when you may want to output the view counter in a custom location.
For instance, you may want to include the view counter in a widget, an Elementor template, or with your post excerpts on archive pages.
This is where the shortcode comes in handy. You can use it to output the counter wherever you want.
Follow this guide if you’ve never used a shortcode before: How to Add Dynamic Content with Shortcodes.
Here is the shortcode without any parameters defined:
That will output the view counter with the same settings you defined in the Settings menu.
If you want to override the label you defined in the settings, you can do so by including the “label” parameter like this:
[iawp_view_counter label="New label"]
Whatever text you enter will be placed before the number of views.
You can override the icon setting by adding the “icon” parameter.
Entering “0” will hide the icon, and “1” will display it.
Lastly, you can add both parameters at the same time, like this:
[iawp_view_counter label="Total Visits:" icon="1"]