Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #677719

    Hi there,

    I recently copied over the footer.php from the main enfold theme to my child theme.
    The footer contains a few tracking pixel scripts from Engagio and Google Analytics.

    However, once the footer was copied over to the child theme, the tracking pixels don’t show up in the source code for my website, leading me to believe that the pixels aren’t tracking anything.

    What could be going wrong?

    Thanks,

    #677773

    Hi gerardbao!

    Please add following code to Functions.php file of your child theme

    function av_footer_scriptz(){
    ?>
    // Your codes go here
    <?php
    }
    add_action('wp_footer', 'av_footer_scriptz');

    Best regards,
    Yigit

    #677845

    Thanks. I added my scripts with this code and it still doesn’t seem to be visible in the source code of my site. Please see code in private content.

    #677870

    Hi,

    Please remove the code from footer.php and try adding the above code in the functions.php file in child theme and it should work.

    Best regards,
    Vinay

    #677875

    I have it added in my functions.php in my child theme and it doesn’t appear in my child code.

    #677917

    Hi,

    The tag manager script does appear on your page. Right click inspect and look for googletag

    Best regards,
    Vinay

    #677921

    I see it now in the inspect element. Thanks! Sorry. I’m used to being able to see these pixel scripts in the source code.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Child theme footer code not showing up in source code’ is closed to new replies.