WP Manifestindependent plugin directory
manifest / editor / wordpress_counter_shortcode

Counter Shortcode

WordPress plugin — animated counter shortcode

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/arro38/wordpress_counter_shortcode/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WordPress plugin providing a [counter] shortcode to animate a number from 0 up to a target value.

The animation is triggered on scroll, when the counter enters the viewport (Intersection Observer) — ideal for highlighting key figures on a home page.

Installation

  1. Place counter-shortcode.php and counter.js into wp-content/plugins/counter-shortcode/.
  2. Activate "Counter Shortcode" from the WordPress Plugins menu.

Usage

Insert the shortcode into a page, a post or a widget:

[counter end="100"]
[counter start="0" end="500" speed="0.1"]

Parameters

Attribute Description Default
start Counter start value 0
end Target value to reach 100
speed Animation speed (the higher the value, the faster) 0.1

How it works

  • The script is only loaded on the front end.
  • The animation starts when 50% of the counter is visible on screen, then observation stops.
  • Smooth rendering via requestAnimationFrame.

Compatibility

WordPress · PHP 7.4+ · GPL2 license

Author

coding974.com