Forked from LaxusCroco/add_google_tag_manager_to_jtc.php
Created
April 7, 2023 07:35
-
-
Save Crocoblock/acfe55297157dd818f76dacb2a09912d to your computer and use it in GitHub Desktop.
Revisions
-
LaxusCroco renamed this gist
Apr 7, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
LaxusCroco created this gist
Apr 7, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ <?php /** * Add Google Tag Manager code for the <head> tag. */ function custom_add_gtm_code() { ?> <!-- Add your GTM code snippet below this line --> <?php } add_action( 'wp_head', 'custom_add_gtm_code' ); /** * Add Google Tag Manager code for the <body> tag. */ function custom_add_gtm_code_noscript() { ?> <!-- Add your GTM code snippet below this line --> <?php } add_action( 'wp_body_open', 'custom_add_gtm_code_noscript' );