• I am trying to put a widget on my blog that’s an affiliate link. The instructions say to insert the code for the widget where you want it and
    “Dont forget to include widget.js once per page, right before the closing </body> tag”

    This is the code I need to insert, but where do I put it?
    <p><script async=”” defer=”” src=”//widget.getyourguide.com/v2/widget.js”></script></p>

    • This topic was modified 6 years, 7 months ago by formerchef.
    • This topic was modified 6 years, 7 months ago by formerchef.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hello formerchef,

    Add below php code into your current active child theme’s functions.php file or you can use Code Snippets plugin for below php code.

    add_action('wp_footer', 'my_custom_footer_js');
    function my_custom_footer_js() {
      echo '<p><script async="" defer="" src="//widget.getyourguide.com/v2/widget.js"></script></p>';
    }

    Hope this will helps you.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘How to inset code before the closing body tag’ is closed to new replies.