Animated Number Counters Shortcode

Below, you’ll find a detailed guide on how to add the Animated Number Counters Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Animated Number Counters Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Animated Number Counters Plugin and the shortcodes it provides:

Plugin Icon
Animated Number Counters

"Animated Number Counters is a dynamic WordPress plugin designed to enhance your website with interactive number counters. It gives your site a visually engaging touch that can boost user interaction."

★★★☆✩ (3) Active Installs: 2000+ Tested with: 6.3.2 PHP Version: 5.6
Included Shortcodes:
  • [anc_6310_number_counter]

Animated Number Counters [anc_6310_number_counter] Shortcode

The Animated Number Counters shortcode is a tool that enables the display of animated numbers on your page. The shortcode extracts the ‘id’ attribute from the given parameters and uses it to include the relevant shortcode.php file. This results in a dynamic, animated number counter based on the specified ‘id’.

Shortcode: [anc_6310_number_counter]

Parameters

Here is a list of all possible anc_6310_number_counter shortcode parameters and attributes:

  • id – A unique identifier that specifies the number counter

Examples and Usage

Basic example – A simple usage of the animated-number-counter shortcode to display the counter with a specific ID.

[anc_6310_number_counter id=1 /]

Advanced examples

Utilizing the shortcode to display multiple animated number counters by referencing different IDs. This will load and display the counters with the corresponding IDs.

[anc_6310_number_counter id=1 /]
[anc_6310_number_counter id=2 /]
[anc_6310_number_counter id=3 /]

It’s important to note that the ID attribute in the shortcode corresponds to the ID of the specific counter you want to display. If the counter with the specified ID doesn’t exist, the shortcode will not display anything.

PHP Function Code

In case you have difficulties debugging what causing issues with [anc_6310_number_counter] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('anc_6310_number_counter', 'anc_6310_number_counter_shortcode');

Shortcode PHP function:

function anc_6310_number_counter_shortcode($atts)
{
   extract(shortcode_atts(array('id' => ' ',), $atts));
   $ids = (int) $atts['id'];

   ob_start();
   include(anc_6310_plugin_url . 'shortcode.php');
   return ob_get_clean();
}

Code file location:

animated-number-counters/animated-number-counters/index.php

Conclusion

Now that you’ve learned how to embed the Animated Number Counters Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *