Adding code to <header>

Hi, have created a child theme and tried following some other threads on the site but every time I add my code where I think it should go by site goes down. I need to add this Crazy Egg code to my clients header throughout the site. Can you walk me through where it needs to go, if I need to copy any files to the child theme, etc. Thanks!

Hello Nick,

Please add this code to the functions.php file of the child theme:

function header_scripts() { ?>

    <!-- Remove this line and add the codes here -->

<?php }

add_action( 'wp_head', 'header_scripts', 99999 );

Please add the code you have in the line <!-- Remove this line and add the codes here -->.

In case the issue persists, please let us know what code you are trying to add in the header.

Hope this helps.

Thanks Jade, that seems to have worked!

You’re welcome!
We’re glad @Jade were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.