Jump to content

Looking to add RESY widget to headliner on site

Recommended Posts

Site URL: http://www.moongreenwich.com

Trying to inject code 

 

<a href="https://resy.com/cities/gwh/moon" id="resyButton-k16ukHT6s6">Book your Moon reservation on Resy</a>
 
<script src="https://widgets.resy.com/embed.js"></script>
<script>
    resyWidget.addButton(document.getElementById('resyButton-k16ukHT6s6'), {"venueId":41949,"apiKey":"1Xa3dZqbRCqp1AMHdQQoRrxYCyHerhjz","replace":true,});
</script>
 
 
Having hard time to do this. When I add as new "link to page/external site" so it goes in nav header, it goes but i see the error "
 " data-animation-role="header-element">Resy"
 
Please help!
Link to comment
  • Replies 2
  • Views 1.6k
  • Created
  • Last Reply
5 minutes ago, matthewmadera said:

Site URL: http://www.moongreenwich.com

Trying to inject code 

 

<a href="https://resy.com/cities/gwh/moon" id="resyButton-k16ukHT6s6">Book your Moon reservation on Resy</a>
 
<script src="https://widgets.resy.com/embed.js"></script>
<script>
    resyWidget.addButton(document.getElementById('resyButton-k16ukHT6s6'), {"venueId":41949,"apiKey":"1Xa3dZqbRCqp1AMHdQQoRrxYCyHerhjz","replace":true,});
</script>
 
 
Having hard time to do this. When I add as new "link to page/external site" so it goes in nav header, it goes but i see the error "
 " data-animation-role="header-element">Resy"
 
Please help!

link nav not support script in its content, you got to move the widget by code

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
6 minutes ago, matthewmadera said:

Site URL: http://www.moongreenwich.com

Trying to inject code 

 

<a href="https://resy.com/cities/gwh/moon" id="resyButton-k16ukHT6s6">Book your Moon reservation on Resy</a>
 
<script src="https://widgets.resy.com/embed.js"></script>
<script>
    resyWidget.addButton(document.getElementById('resyButton-k16ukHT6s6'), {"venueId":41949,"apiKey":"1Xa3dZqbRCqp1AMHdQQoRrxYCyHerhjz","replace":true,});
</script>
 
 
Having hard time to do this. When I add as new "link to page/external site" so it goes in nav header, it goes but i see the error "
 " data-animation-role="header-element">Resy"
 
Please help!

Try to do following

1. Add the new navigation item as link/page external with this url

https://resy.com/cities/gwh/moon

2. Add the modified script into Settings->Advanced->Code Injection->Footer

<script src="https://widgets.resy.com/embed.js"></script>
<script>
    resyWidget.addButton(document.querySelector(".header-nav-item a[href*=resy][href*=moon]"), {"venueId":41949,"apiKey":"1Xa3dZqbRCqp1AMHdQQoRrxYCyHerhjz","replace":true,});
</script>

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.