This topic has 3 replies, 2 voices, and was last updated 9 years by US.

  • Author
  • #41432
     US
    Participant

    I’m going to use this plugin:
    https://wordpress.org/plugins/duracelltomi-google-tag-manager/installation/

    The instructions state:

    If you select ‘Custom’ you need to edit your template file and add the following line just after the opening <body> tag:

    <?php if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); } ?>

    My question is this: Where do I best place this line in a child theme?

    #41436
     sharmstr
    Moderator

    copy /kleo/header.php to /kleo-child/header.php. The body tag is in that file.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #41437
     sharmstr
    Moderator

    Actually I just look at it and there’s ‘kleo_after_body’ action to can plug into if you want.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #41440
     US
    Participant

    Thank you

    I placed it here:

    <body <?php body_class(); ?> itemscope itemtype=”http://schema.org/WebPage”&gt;
    <?php if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); } ?>

    <?php do_action(‘kleo_after_body’);?>

    Working well: https://retrocutie.com

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?