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

    Hi, I’m trying to add custom code for a Resdiary Booking widget. However, when I add the code nothing happens?

    <div id=”rd-widget-frame” style=”max-width: 731px; margin: auto;”></div>

    It says I need to add the next to lines of code to the end of the HTML body?
    <input id=”rdwidgeturl” name=”rdwidgeturl” value=”https://booking.resdiary.com/widget/Mini/Landscape/LimeTyger/24575?includeJquery=false&#8221; type=”hidden”>
    <script type=”text/javascript” src=”https://booking.resdiary.com/bundles/WidgetV2Loader.js”></script&gt;

    Any help would be appreciated!

    Jack

    #1297674

    Hey Jack,

    Should all the code you posted go in the same place? It might be a good idea if you reach out to the authors of the code for clarification.

    Best regards,
    Rikard

    #1297709

    Hi Rikard. No the authors said the bottom two lines :

    <input id=”rdwidgeturl” name=”rdwidgeturl” value=”https://booking.resdiary.com/widget/Mini/Landscape/LimeTyger/24575?includeJquery=false” type=”hidden”>
    <script type=”text/javascript” src=”https://booking.resdiary.com/bundles/WidgetV2Loader.js”></script>

    need to add these lines to the end of the HTML body?

    The only code that should be in the code block is <div id=”rd-widget-frame” style=”max-width: 731px; margin: auto;”></div>

    I’m not sure how to add the code to the end of the HTML body

    • This reply was modified 3 years, 6 months ago by jackcharlto.
    #1297983

    Hi,

    You can try this in your functions.php file:

    function jack_add_custom_code(){ 
    ?>
    <input id="rdwidgeturl" name="rdwidgeturl" value="https://booking.resdiary.com/widget/Mini/Landscape/LimeTyger/24575?includeJquery=false" type="hidden">
    <script type="text/javascript” src=”https://booking.resdiary.com/bundles/WidgetV2Loader.js"></script>
    <?php
    }
    add_action('wp_footer', 'jack_add_custom_code');

    Or simply add the footer.php template to your child theme, then add the code where it’s supposed to go.

    Best regards,
    Rikard

    • This reply was modified 3 years, 6 months ago by Rikard.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.