How can I add the LinkedIn Insight Tag javascript to the global footer, right above the closing HTML body tag?
Hey m,
You can use a function in your functions.php file:
function add_custom_code(){
?>
//CODE GOES HERE
<?php
}
add_action('wp_footer', 'add_custom_code');
Best regards,
Rikard
Thank you, so I needed to install the child theme before adding the custom function code. I also imported theme settings from parent theme. And I cleared the cache. But the site still doesn’t look the way it should. Fonts and button styles aren’t correct. What other import needs to be done to have exactly the same site as before the child theme was installed?
It seems that the Custom CSS that was imported in isn’t being used.
Aargh, never mind. Browser or time issue, self resolved. Will follow up on functions issue…
Hi,
Great, I’m glad that you got it working and thanks for the updates. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
Rikard
Thanks Rikard,
I can confirm once I see data collecting in LinkedIn – which I haven’t so far. So, is this correct – the entire functions php file in enfold-child is (I added the first //* here only)?:
//*<?php
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/
function add_custom_code(){
?>
//CODE GOES HERE
<?php
}
add_action(‘wp_footer’, ‘add_custom_code’);
Thanks for your help.
OK, the data is coming in. It’s working, thank you!! This can be closed.
Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon