This guide shows you how to control the visibility of Views on your WordPress site using the Post Views Counter plugin. You can show Views automatically on your content, use the [post-views] shortcode for manual placement, add a widget to highlight top posts, or completely hide the counter from specific visitors or locations.

Prerequisites

Before configuring display settings, ensure the following:

  • Post Views Counter plugin is installed and activated
  • Tracking is enabled for your desired post types at Post Views > Counting > Tracking Targets > Post Types
  • Views have been recorded (visit some posts to generate initial data)

Steps

Display Views Automatically

Configure the plugin to automatically show Views on your content.

  1. Navigate to Post Views > Display > Counter Appearance.
  2. Set Views Label to the text you want displayed next to the count (default: "Post Views:").
  3. Configure Display Style to show an icon, label text, or both:
    • Icon — Displays only the views icon
    • Label — Displays only the text label
  4. Navigate to Post Views > Display > Display Targets > Position.
  5. Select where to display the counter:
    • Before the content — Inserts the counter above your post content
    • After the content — Inserts the counter below your post content (default)
    • Manual only — Disables automatic display; use shortcode or template functions instead
  6. Under Post Types at Post Views > Display > Display Targets > Post Types, select which post types should display the counter.
  7. Under Page Type at Post Views > Display > Display Targets > Page Type, select the page contexts where the counter appears (default: singular posts).
  8. Click Save Changes.

Pro Feature: Enable Dynamic Loading at Post Views > Display > Counter Appearance > Dynamic Loading to load view counts via JavaScript. This prevents cached pages from showing outdated view counts when using caching plugins.
Pro Feature: Enable Dynamic Loading at Post Views > Display > Counter Appearance > Dynamic Loading to load updated Views via JavaScript. This prevents cached pages from showing outdated numbers when using caching plugins.

Pro Feature: Use Views Period at Post Views > Display > Counter Appearance > Views Period to display views for a specific time range. The default option shows total views.

Display Views with Shortcode

Use the [post-views] shortcode for manual placement within post content or widget areas.

  1. Edit the post, page, or widget where you want to display Views.
  2. Add the shortcode [post-views] in the content editor.
  3. Update or publish the content.

The shortcode renders Views with your configured label and display style.

Pro Feature: Use the [site-views] shortcode to display total site-wide views across all content.

Display Top Posts with Widget

Display a list of most-viewed posts using the built-in widget.

  1. Navigate to Appearance > Widgets (or Appearance > Customize > Widgets in the Customizer).
  2. Locate the Post Views Counter List Widget.
  3. Drag it to your desired widget area.
  4. Configure the widget settings:
    • Enter a title for the widget
    • Select the number of posts to display
    • Choose whether to show view counts
  5. Save the widget.

Display Views in Theme Templates

For theme developers, use template functions to display views programmatically in your theme files.

Display views for the current post:

<?php echo do_shortcode( '[post-views]' ); ?>

Get the view count as a number:

<?php
$views = pvc_get_post_views( get_the_ID() );
echo $views . ' views';
?>

Display a list of most viewed posts:

<?php
pvc_most_viewed_posts( array(
    'number' => 5,
    'post_type' => 'post'
) );
?>

Get most viewed posts as an array:

<?php
$popular_posts = pvc_get_most_viewed_posts( array(
    'number' => 10,
    'post_type' => 'post'
) );

foreach ( $popular_posts as $post ) {
    echo '<a href="' . get_permalink( $post->ID ) . '">' . get_the_title( $post->ID ) . '</a><br>';
}
?>

Pro Feature: Additional Pro template functions include:

// Get site-wide total views
$site_views = pvc_get_site_views();

// Get most viewed taxonomy terms
$terms = pvc_get_most_viewed_terms( array(
    'number' => 5,
    'taxonomy' => 'category'
) );

// Get most viewed users (authors)
$users = pvc_get_most_viewed_users( array(
    'number' => 5
) );

Display Views in Admin

Show Views in the WordPress admin post list.

  1. Navigate to Post Views > Display > Admin Interface.
  2. Ensure Admin Column is enabled (default: enabled).
  3. Navigate to your post list (e.g., Posts > All Posts).
  4. The Views column displays the count for each post.

To allow editing view counts directly from the post editor:

  1. Navigate to Post Views > Display > Admin Interface.
  2. Enable Admin Edit to add a views field to the post edit screen.

Hide Views Completely (Manual Only)

Disable automatic display of Views on all content.

  1. Navigate to Post Views > Display > Display Targets > Position.
  2. Select Manual only.
  3. Click Save Changes.

The counter will no longer appear automatically. You can still use the [post-views] shortcode or template functions for selective display.

Hide Views from Specific Visitors

Control who sees the view counter on the front end.

  1. Navigate to Post Views > Display > Display Audience > User Type.
  2. Select visitor groups that should NOT see the counter:
    • logged in users — Hide counter from logged-in visitors
    • guests — Hide counter from non-logged-in visitors
    • selected user roles — Hide counter from specific user roles
  3. If you selected selected user roles, configure User Roles at Post Views > Display > Display Audience > User Roles to choose which roles to exclude.
  4. Save changes.

Display on Taxonomy and Author Archives

Display Views on taxonomy archive pages (categories, tags, custom taxonomies) and author archive pages.

Taxonomy Archives:

  1. Navigate to Post Views > Display > Display Targets.
  2. Enable Taxonomies to display Views on taxonomy archive pages.
  3. Configure Taxonomies Display to select which taxonomies should show the counter.

Author Archives:

  1. Navigate to Post Views > Display > Display Targets.
  2. Enable Author Archives to display Views on author archive pages.

Verification

Confirm Views are displaying or hiding correctly:

  1. Automatic display: Visit a single post on your site and verify Views appear above or below the content based on your position setting.
  2. Manual only: Visit a single post and confirm no counter appears automatically. Add the [post-views] shortcode to a post and verify it renders.
  3. Hidden from visitors: Log in as a user from an excluded group and confirm the counter is not visible. Log out or use a different account and verify the counter appears.
  4. Admin column: Navigate to Posts > All Posts and verify the Views column appears with numeric values.
  5. Format check: If Format Number is enabled at Post Views > Display > Counter Appearance > Format Number, counts should display with locale-appropriate formatting (e.g., "1,234" instead of "1234").

Troubleshooting

Views not appearing on posts

Symptom: The counter is not visible on your content despite being enabled.

Cause: The position is set to "Manual only" or the post type is not selected for display.

Fix:

  1. Check Post Views > Display > Display Targets > Position is set to "Before the content" or "After the content".
  2. Verify your post type is selected under Post Types at Post Views > Display > Display Targets > Post Types.
  3. Confirm Page Type at Post Views > Display > Display Targets > Page Type includes "singular" or the appropriate context for where you’re viewing the content.

Views show zero or an incorrect value

Symptom: Posts display "0 views" or counts don’t match expected values.

Cause: Tracking may not be enabled for the post type, or views haven’t accumulated yet.

Fix:

  1. Verify tracking is enabled at Post Views > Counting > Tracking Targets > Post Types.
  2. Check that the counter mode at Post Views > Counting > Tracking Behavior > Counter Mode is appropriate for your setup. If using caching, select JavaScript Mode, REST API Mode, or Fast AJAX instead of PHP Mode.
  3. Visit several posts to generate view data, then refresh to see updated counts.

Views not updating on cached pages

Symptom: View counts appear frozen or outdated when using a caching plugin.

Cause: The page is cached and the displayed count is not being refreshed.

Fix:

  1. Enable Dynamic Loading at Post Views > Display > Counter Appearance > Dynamic Loading to load counts via JavaScript after the page loads.

  1. Alternatively, use the [post-views] shortcode with a caching-compatible counter mode (JavaScript Mode, REST API Mode, or Fast AJAX) configured at Post Views > Counting > Tracking Behavior > Counter Mode.

Counter visible to wrong visitor groups

Symptom: View counter appears for visitors who should not see it.

Cause: Display audience restrictions are not configured correctly.

Fix:

  1. Review settings at Post Views > Display > Display Audience > User Type.
  2. Ensure the correct groups are selected to hide the counter.
  3. If restricting by role, verify the specific roles are selected under User Roles at Post Views > Display > Display Audience > User Roles.

Counter hidden from all visitors unexpectedly

Symptom: View counter does not appear for any visitors despite position being set correctly.

Cause: Display audience restrictions may be excluding all visitor types.

Fix:

  1. Check Post Views > Display > Display Audience > User Type.
  2. Ensure you have not selected both "logged in users" and "guests" simultaneously, which would hide the counter from everyone.
  3. Clear any selections in User Type to show the counter to all visitors.