I know there are a lot of topics on this, and I\'ve already looked at all them and none of the solutions there apply to me.
I\'ve put a shortcode to run a jscript fo
Don´t use inline JS - use register_script() and wp_enqueue_script
function o99_load_my_scripts()
{
// Register for a plugin:
wp_register_script( 'custom-script', plugins_url( '/js/my-custom-script.js', __FILE__ ) );
// or
// Register for a theme:
wp_register_script( 'custom-script', get_template_directory_uri() . '/js/my-custom-script.js' );
// then, you can then enqueue the script:
wp_enqueue_script( 'custom-script' );
}
add_action( 'wp_enqueue_scripts', 'o99_load_my_scripts' );