Either the script can be executed within the post or I have to place this script in head tag etc. I’m using beTheme wordpress
So where are you putting the script now (if not within the post or in the head)?
From yous screenshot, it seems you’re putting the JavaScript code in some kind of visual editor, and that’s not likely to work. Put the code in an HTML editor/block.
Thanks for your answer.
Actually the same embedded script from FUNDA is working on this page https://www.homecrew.nl/rent-out/.
But the issue is with this page. Script isn’t working on this page https://www.homecrew.nl/reviews-recensies-beoordelingen-klanten-engels/. The Editor & method of placing the script is the same. I cleared the cache etc. But still, the issue is there.
I found this on Wpbegginer. Is this okay to add a script in funcations.php for this specific page id?
Adding JavaScript to a Specific WordPress Post Using Code
If you only want to add JavaScript to a single WordPress post, then you will need to add conditional logic to the code.
function wpb_hook_javascript() {
if (is_single ('5')) {
?>
<script type="text/javascript">
// your javscript code goes here
</script>
<?php
}
}
add_action('wp_head', 'wpb_hook_javascript');