Shortcode Count
-
Hey guys!
I’m working on a plugin that creates HTML Code via a shortcode.
Now I want to identify the created HTML when the shortcode gets called twice or more often.Like:
<div class="myClass-0"></div> <div class="myClass-1"></div>Is there a way to count how many times a specific shortcode got called?
I tried this PHP code:
if(!$count) { $count = 0; } else { $count = $count + 1; }But it seems as the variable gets deleted after calling the shortcode one time.
I also tried global variables… But all this didn’t seem to work.Hope somebody can help me!
Greets
J.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Shortcode Count’ is closed to new replies.