Using do_shortcode()
-
Hello,
Apologies if this is in the wrong forum section.I am trying to automatically refresh a function for a number calculation, I’ve added a shortcode to this function for ease of adding to a page. I want this function to update after X amount of seconds rather than reloading entire page.
The current way I’m trying this is using .load(‘/file.php’) wrapped in a set interval function. This then loads a php file containing echo do_shortcode(‘[shortcodename]’);
The refresh function works great when loading in the .php file containing basic text as a test, however adding the do_shortcode function flags using fatal error: undefined function do_shortcode.What am I missing to make sure do_shortcode function is recognised ?
Thanks in advance! Still a novice when it comes to wordpress
- The topic ‘Using do_shortcode()’ is closed to new replies.