Plugin - WpScriptly

Visitor Counter Plugin – Track Unique Visitors by IP Address

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

These scripts, CSS styles, and plugins are designed to work best with minimal interference from themes or other plugins. If conflicts arise, adjustments may be needed.
Please note that they must be used as is.”

Let me know if you’d like any further refinements!

Wp Scriptly

Was this information helpful?

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.