[Resolved] updating link in footer after theme update

Home Forums Support [Resolved] updating link in footer after theme update

Home Forums Support updating link in footer after theme update

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #117058
    Ian

    Every time the theme is updated I have been manually inserting <script src=”//nht-2.extreme-dm.com/t.js” id=”eX-wurzel-2″ async defer></script> into the footer so that my stats package can record visitor details.

    I have been using the GeneratePress Child theme but with my limited programming skills I don’t know if it’s possible to put a line of code in the child theme to save me having to manually update the footer file every time the theme is updated.

    I have tried just inserting the code above on it’s own but that won’t work so I assume that I need to do something else.

    Still loving the theme which I’m using on my blog http://factoringblog.co.uk/ and would like to point out to others that it’s a great theme for anyone with limited WordPress skills

    #117126
    Tom
    Lead Developer
    Lead Developer

    Hi Ian,

    Do you have GP Hooks? If so, you can place it into the wp_footer hook in “Appearance > GP Hooks”.

    If not, you could do something like this:

    add_action( 'wp_footer','generate_add_script' );
    function generate_add_script()
    {
    ?>
          Your script in here
    <?php
    }

    Adding PHP: http://generatepress.com/knowledgebase/adding-php-functions/

    #117256
    Ian

    I did buy the set of extras but with my lack of technical nous I’ve never used the Hooks as I didn’t know what it did but having followed your instructions it has worked a dream.

    Many thanks Tom.

    #117356
    Tom
    Lead Developer
    Lead Developer

    Glad I could help 🙂

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