I need to add the following code
<script type=’text/javascript’ async=’true’ src=’https://app.ontraport.com/js/ontraport/opt_assets/drivers/opf.js’ data-opf-uid=’p2c156356f19′ data-opf-params=’borderColor=#000000&borderSize=0px&filloutRestrictions=true&formHeight=449&formWidth=100%&maxTriggers=2&onVisitDuration=2&popPosition=mc&timeframe=1&instance=n980655430′></script>
I read it should be added to the footer php before the closing body tag.
This is what I find in it and I’m unsure of where to place it
/* Always have wp_footer() just before the closing </body>
* tag of your theme, or you will break many plugins, which
* generally use this hook to reference JavaScript files.
*/
wp_footer();
<div id=”fb-root”></div>
</body>
</html>
Thanks in advance
Hey paulinanoy,
Here is the code you can put in your funtions.php
function add_custom_script(){
?>
<script type='text/javascript async='true' src='https://app.ontraport.com/js/ontraport/opt_assets/drivers/opf.js' data-opf-uid='p2c156356f19' data-opf-params='borderColor=#000000&borderSize=0px&filloutRestrictions=true&formHeight=449&formWidth=100%&maxTriggers=2&onVisitDuration=2&popPosition=mc&timeframe=1&instance=n980655430'></script>
<?php
}
add_action('wp_footer', 'add_custom_script');
If you need further assistance please let us know.
Best regards,
Victoria