Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1438931

    Hello

    What would be the best way to add code to the <head> and <body> sections? Please see private content –

    Thanks
    B

    #1438940

    Hey schwabino,
    I would wrap your code in this and add this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function custom_script() { ?>
      <script>
    
    //your code here
    
      </script>
      <?php
    }
    add_action( 'wp_head', 'custom_script', 99 );

    Best regards,
    Mike

    #1439019
    This reply has been marked as private.
    #1439021

    Hi,
    If you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
    Enfold_Support_2680.jpeg
    then add the code and save.

    Best regards,
    Mike

    #1439031
    This reply has been marked as private.
    #1439054

    Hi,

    Thank you for the update.

    then added the code where you told me too – but then it says this?

    What does it say? Do you get any errors? Please provide a screenshot or provide the site URL in the private field. The link below should help.

    // https://www.analyticsmania.com/post/how-to-check-if-google-tag-manager-is-working/

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.