Adding code to header? Cant find a place to put it?

Hi guys, I need to add some code to the header but don’t know where to put it. Also, I have heard that I need to download a child theme. Can you help give a step by step from downloading a child them to inserting the code into the header please?

many thanks in advance

Kind regards,

Ajay

This is an automated message to notify you that your thread was posted in the wrong forum, and it has been moved to the correct place. A member of our team will be happy to reply just as soon as your thread is up. How support works.

For support, please post all questions in the Support Forum.

For peer to peer conversations with other Themeco customers about tips, customizations, or suggestions you are welcome to use the Conversation Forum (no official support provided here).

Design & Development, Marketing & Media, and Hosting & Optimization are for discussion with fellow Apex members about non Themeco related topics. Please keep this in mind in the future.

Thank-you!

Hi Ajay,

Thanks for writing in.

You can find the information and the child theme here.

Once you have installed and activated the child theme, please login through FTP and go to wp-content/themes/x-child then edit the functions.php file and add this code in the file.

add_action('wp_head','custom_script');

function custom_script() {
?>

    <!-- Add your code here -->

<?php
}

Hope this helps.

This broke my site. Is there another way to add a custom script to the header.php. I’ve been instructed to add this for my live chat:

<script src="//code.tidio.co/m4ixzruoarvh3v0sxuq6o5amqftss9jj.js"></script>

Hi There,

Would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

Thanks.