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

    Hi,

    http://www.newyorkinspiration.com
    I am going to add this code but don’t know where to add it.

    <!– HTML element the widget will be inserted into –>
    <div id=”gyg-widget”></div>

    <!– HTML script element that runs the widget –>
    <script async defer src=”//widget.getyourguide.com/v2/core.js” onload=”GYG.Widget(document.getElementById(‘gyg-widget’),{‘q’:’Paris’});”></script>

    This code should then be added in a blog post:
    <div id=”gyg-widget-58d97da382bee”></div><script async defer src=”//widget.getyourguide.com/v2/core.js” onload=”GYG.Widget(document.getElementById(‘gyg-widget-58d97da382bee’),{‘currency’:’USD’,’localeCode’:’en-US’,’numberOfItems’:’10’,’partnerId’:’2065C5D’,’q’:’New York’});”></script>

    Thanks
    Charlotte

    #768229

    Hey Charlotte :)

    Please add following code to Functions.php file in Appearance > Editor

    function av_cr_custom_script(){
    ?>
    <script async defer src="//widget.getyourguide.com/v2/core.js" onload="GYG.Widget(document.getElementById('gyg-widget'),{'q':'Paris'});"></script>
    <?php
    }
    add_action('wp_footer', 'av_cr_custom_script');

    Then you can simply add following code to your blog post in text tab

    
    <div id="gyg-widget-58d97da382bee"></div><script async defer src="//widget.getyourguide.com/v2/core.js" onload="GYG.Widget(document.getElementById('gyg-widget-58d97da382bee'),{'currency':'USD','localeCode':'en-US','numberOfItems':'10','partnerId':'2065C5D','q':'New York'});"></script>

    Best regards,
    Yigit

    #768439

    Thanks :)

    #768453

    Hi!

    Please feel free to create a new ticket if you need anything else from us.

    Thanks a lot

    Cheers!
    Basilis

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Html script’ is closed to new replies.