Ad Inserter
94Manage Google AdSense ads, banners, ad rotation, sticky widgets, AMP ads, ads.txt, tracking, header and footer...
Enables you to display how many times a post/page had been viewed.
WP-PostViews is a WordPress plugin that counts how many times each post, page, or custom post type has been viewed. It allows you to display this count using a shortcode or template tag, and offers customisation options for how the count is shown. The count is stored as post meta, enabling sorting and querying like other post data.
You can choose who is counted in the views—everyone, guests only, or logged-in users—and exclude known bots. The plugin also includes features for displaying the most and least viewed posts, and integrates with the REST API and WP-Stats plugin for additional functionality.
Best for: This plugin is suitable for bloggers and website owners looking to track and display post views.
What it does well
Where it falls short
WP-PostViews provides a straightforward solution for tracking post views, with flexible display options. It may be useful for those wanting to enhance their site's analytics.
Lester Chan's own description of WP-PostViews, lightly tidied.
WP-PostViews counts how many times each post, page or custom post type has been read and gives you somewhere to show the number. The count is kept as post meta, so it sorts, queries and exports like anything else WordPress stores about a post.
[views] shortcode.views field, and an AJAX counting path for sites behind a page cache.I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
The simplest way, and the only one that works in a block theme without editing template files, is the shortcode. Put it in the post or page whose count you want shown:
[views] shows the count for the post it appears in.[views id="1"] shows the count for post 1, wherever you put it.To show the count on every post automatically, a classic theme calls the template tag from index.php, archive.php, single.php or page.php, anywhere inside the loop:
<?php if ( function_exists( 'the_views' ) ) { the_views(); } ?>
The settings live at WP-Admin -> Settings -> WP-PostViews, on two tabs. Settings is where you choose who gets counted and whether WP-Stats is offered a Views section; Templates is where you edit the markup a count is rendered with.
Where the count appears is decided by where your theme calls the_views() or where you put the shortcode. To hide it somewhere in particular, answer the wp_postviews_should_display filter:
add_filter( 'wp_postviews_should_display', function ( $show ) {
return ! is_archive() && ! is_search();
} );
One block is available in the editor, under Widgets:
[views] does, or set it to another post’s ID to show that post’s count instead.Other plugins for custom content structures.
Manage Google AdSense ads, banners, ad rotation, sticky widgets, AMP ads, ads.txt, tracking, header and footer...
ACF helps customize WordPress with powerful, professional and intuitive fields. Proudly powering over 2 millio...
Checkout Field Editor (Checkout Manager) for WooCommerce – The best WooCommerce checkout manager plugin to man...
Easily reorder posts, pages, custom post types, and taxonomies with intuitive drag-and-drop sorting in the Wor...
The #1 user-rated activity log plugin for event logging, activity monitoring and change tracking.
Admin UI for creating custom content types like post types and taxonomies