Steve Fronek
asked 6 years ago

I’m adding the Google Tag Manager plugin and is says to add the following line just after the opening <body> tag:

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

Which template is the <body> tag located?
I thought it would be in the header.php template, but I can’t find it.
Thanks for the help.

1 Answers
DominicStaff
answered 6 years ago

You can open the base.php file in the folder path “wp-content\themes\dw-trendy” and look at this line:

<body <?php body_class(); ?>>

Press Enter to begin a new line and add the following code:

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

Save and upload the base.php file.
Regards,

Powered by DW Question & Answer Pro