External widget not displaying

Hi,

I’ve been given this widget from ResDiary to embed on a site. I’ve used the Raw Content element but am having no luck no matter where I try and put either the content or the extra lines from the instructions. Any ideas?

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

<input id="rdwidgeturl" name="rdwidgeturl"value="https://booking.resdiary.com/widget/Standard/Pitigliano/25893?includeJquery=false" type="hidden">
<script type="text/javascript" src="https://booking.resdiary.com/bundles/WidgetV2Loader.js"></script>

Hi @RubberDuckers,

Thanks for reaching out!

The script will not work inside the Raw Content element, I suggest that you split the code. Please follow the steps below.

1.) Download this plugin https://wordpress.org/plugins/insert-headers-and-footers/
2.) In the Settings > Insert Header and Footer, add the code below in the Script Header.
<script type="text/javascript" src="https://booking.resdiary.com/bundles/WidgetV2Loader.js"></script>
3.) Then in your Raw content element, the code should only be

<div id="rd-widget-frame" style="max-width: 600px; margin: auto;"></div>
<input id="rdwidgeturl" name="rdwidgeturl"value="https://booking.resdiary.com/widget/Standard/Pitigliano/25893?includeJquery=false" type="hidden">

Hope that helps.

Thank you.

Thanks @marc_a I’d actually tried this too (though, using Perfmatters header/body/footer code editor.
It actually gets a console error when I inspect the page, not sure if that’s the reason - so not a Pro issue.

This is the site: https://staging.pitiglianorestaurantbar.co.uk/book/
Though the one you see is an iFrame instead but if you inspect below you’ll see the widget frame.

The console error is
WidgetV2Loader.js:1 Uncaught TypeError: $ is not a function
at WidgetV2Loader.js:1
at i (WidgetV2Loader.js:1)
at WidgetV2Loader.js:1

Hi @RubberDuckers,

It seems that the issue is not related to the theme or bundled plugins, I would suggest you contact the provider of this service in this case.

Thanks

Thought that may be the case! Thanks anyway :slight_smile:

We are delighted to assist you with this.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.