Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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 Code

    Thanks

    #1400395

    Hey 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.
    #1401806

    Hi,

    Can I add the code you suggested anywhere in the functions.php?

    Thanks

    #1401827

    Hi,

    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,
    Rikard

    #1401855

    Hi,

    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

    #1401873

    Hi,

    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,
    Rikard

    #1401877

    OK 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
    Marcus

    #1401882

    Thanks

    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

    #1401888

    Hi,

    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

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.