Hi – I was wondering what the best way would be to add the java script below? I’ve been adding in a code block but it’s cutting off. Please advise.
Hi annameis,
The best way you can add it is via hooks:
function custom_script_name(){
?>
<script>
// Your script here
</script>
<?php
}
add_action('wp_footer', 'custom_script_name');
For further information check: https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/#add-a-script-to-footer-section
Then to load it only to a specific page, use the WordPress Conditional Tag: https://codex.wordpress.org/Conditional_Tags
Hope this helps.
Best regards,
Nikko