Hi, I have inserted a bit of html containing a javascript link into a text element in cornerstone which imbeds a countdown timer from an online service called Countdown Monkey. This works fine when logged in but when I view the same page on another browser or logout of wordpress, the countdown timer disappears. I read somewhere that you need to insert some additional code in the functions.php file to register the javascript and to prevent it from disappearing. I have tried this code:
function x_theme_name_scripts() {
wp_enqueue_script( 'mc_25x5_ifid', get_template_directory_uri() . 'https://countdownmonkey.com/counter/815/10816s.js', array('jquery'), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'x_theme_name_scripts' );
Unfortunately it didn’t do anything. I’ve attached a screen grab of the timer which is visible when logged in.
Please could you advise me on the correct code.
Many thanks
Lewis