-
AuthorPosts
-
March 7, 2023 at 2:26 pm #1400362
Hi,
I want to implement Google Tag Script
Does it still work embedding Google Tag Script at > Enfold > Theme Options > Google Services > Google Analytics Tracking CodeThanks
March 7, 2023 at 8:08 pm #1400395Hey woogie07,
You can try it there first of all, if it doesn’t work then you can use a function in functions.php:
function woogie07_add_gtag(){ ?> Your script goes here <?php } add_action('wp_head', 'woogie07_add_gtag');
Best regards,
Rikard- This reply was modified 1 year, 8 months ago by Rikard.
March 20, 2023 at 5:20 pm #1401806Hi,
Can I add the code you suggested anywhere in the functions.php?
Thanks
March 20, 2023 at 7:24 pm #1401827Hi,
If you are not running a child theme, then please set that up first of all: https://kriesi.at/documentation/enfold/install-enfold-theme/#why-child-theme. After that, you can add it to the bottom of functions.php in your child theme.
Best regards,
RikardMarch 21, 2023 at 7:09 am #1401855Hi,
No I am not running a Child Theme. Last time I tried adding it, I lost some of the style settings, so I had to switch back.
Is there no way I can add the coding to the bottom of the main theme functions.php or another way to add coding into the body tag?
Thanks
March 21, 2023 at 10:11 am #1401873Hi,
You will lose all customisation that you put in the theme core files on updates, so I would recommend that you add a child theme.
If your theme settings are not applying when activating the child, then you can import the parent theme settings under Enfold->Import/Export. Also remember to deactivate file compression and activate the options to delete old CSS and JS files under Enfold->Performance if your styling/settings should not apply.
Best regards,
RikardMarch 21, 2023 at 10:23 am #1401877OK thanks,
If I activate Child theme, does it automatically pull in any header.php script that was added in the main Enfold Theme prior to the Child Theme?
Thanks
MarcusMarch 21, 2023 at 10:49 am #1401882Thanks
Do I need to action the below before Child theme is activated?
“Deactivate file compression and activate the options to delete old CSS and JS files under Enfold->Performance if your styling/settings should not apply.”
Do you have a link to download the latest Child Theme?
Thanks
March 21, 2023 at 11:07 am #1401888Hi,
Do I need to action the below before Child theme is activated?
“Deactivate file compression and activate the options to delete old CSS and JS files under Enfold->Performance if your styling/settings should not apply.”
If your settings don’t apply after activating the child, then do that.
https://kriesi.at/documentation/enfold/child-theme/
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.