Visitor Counter Plugin – Track Unique Visitors by IP Address

Plugin - WpScriptly

The Visitor Counter Plugin for WordPress allows you to track unique visitors based on their IP addresses, providing more accurate visitor counts for your posts and pages. It features a shortcode that displays the visitor count with customizable inline styles for both the “Views:” label and the number itself. The plugin includes an admin panel where you can configure settings such as excluding admin visits from being counted. It’s ideal for anyone looking to monitor real visitor engagement while maintaining control over styling and functionality.

Admin panel View:

Post view count:

Download:

Version: 1.7 final release

Explanation of the Changes

  1. Inline Styles for “Views:” and Count:
    • The vc_display_view_count() function now includes two inline style variables: $label_style and $count_style.
    • These styles are applied to the “Views:” label and the count number respectively, using inline styles directly within the HTML output.
    Example styles:
    • "Views:" has blue text (#0000FF) and normal font weight.
    • The count number has orange text (#FF4500), bold font weight, and an 18px font size.
  2. Example Output: When you use the shortcode, the HTML will look like this: Views: 120
html code:
<span class="vc-view-label" style="color: #0000FF; font-weight: normal;">Views:</span>
<span class="vc-view-count" style="color: #FF4500; font-weight: bold; font-size: 18px;">15</span>

This allows you to customize the appearance of both elements independently via inline styles.

Usage

  • Add the shortcode:
  • The inline styles will automatically apply to the “Views:” label and the visitor count.
The shortcode:
[visitor_count]

If you need to customize the CSS you can ether edit the plugin files or use this to over write the CSS. Save this to your style.css

.vc-view-label {
    color: #0000FF; /* Blue text for "Views:" */
    font-weight: normal;
}

.vc-view-count {
    color: #FF4500; /* Orange text for the count */
    font-weight: bold;
}

Notes:

Wp Scriptly

This basic script, CSS style, and plugin are designed to function optimally assuming minimal interference from your theme or other plugins. If conflicts occur or further customization is needed, additional adjustments may be necessary. Please note that this script, CSS style, or plugin must be used AS IS.

Wp Scriptly

Newsletter Signup

WP Scriptly Newsletter

The WpScriptly Monthly newsletter offers top insights for WordPress pros: new scripts, plugins, resources, tips, tools, updates, and more every month.
*Wp Scriptly will not share or sell your name and email adress to anyone!

One Comment

Master Coder

I’m in the process of replacing wp-postview plugin since it has not been updated in over a year with my own plugin. I really plan to do alot of plugins that I have used before. To replace them all for my own. Since I know they are generally compliant with the any version of WordPress for a very long time.