Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1395773

    spixelZA
    Participant

    Hi

    Im struggling to add the hot jar script to my theme x header.php file but cannot seem to locate it do i add it to the child or main x?

    Please advise.

    Thank you

    #1395828

    Rupok
    Member

    Hi there,

    Thanks for writing in! You can add your scripts like below on your Child Theme’s functions.php

    function my_custom_head_output() { ?>
    
     <script type="text/javascript">
      // Add your custom scripts here
     </script>
    
    <?php }
    
    add_action( 'wp_head', 'my_custom_head_output' );

    If you wish to achieve this through plugin, then you can try this : https://wordpress.org/plugins/header-and-footer-scripts/

    Cheers!