Hello,
I need to ad a second script to de the body of a site. We already have a script for google (https://kriesi.at/support/topic/customizing-the-header-php-in-a-childtheme/). Now we need to ad a script voor LinkedIn alswel.
Can we ad this in this in:
function my_custom_code_footer(){ ?>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PBVK9M2"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<?php }
add_action('wp_footer', 'my_custom_code_footer');
or do we need to make a custom function for each script?
Hey Tim,
You should be able to add your script below the
<!-- End Google Tag Manager (noscript) -->
line
if you include the
<script> ... </script>
tags.
Or you can add your script to a new function to make it easier to manage them in the future:
function custom_linkedin(){
?>
<script>
//your code here
</script>
<?php
}
add_action('wp_footer', 'custom_linkedin');
Best regards,
Mike
Thnx Mike!
Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.
For your information, you can take a look at Enfold documentation here
And if there are features that you wish Enfold had, you can request them and vote the requested ones here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)
Best regards,
Mike