Jump to content

Custom Code works in Wix but not squarespace

Recommended Posts

Hi there,

I"m helping someone get a site up and running to link in with Guesty.com - a 3rd party software for booking holiday rentals.  I've added this code block which works well in Wix, but doesn't display well in squarespace.  Does anyone know why or what I can do to display well?  Guesty have given me this code, but said they won't support as they don't use squarespace - and I don't want to use Wix - any help would be greatfully received.  The code is just for a search bar with a calendar.

Many thanks

<div id="search-widget_IO312PWQ"><script>!function(e,t,a,n,c,r){function s(t){e.console.log("[Guesty Embedded Widget]:",t)}var i,d,l,o,y,m,g,h,p,u;n&&(i=n,d=t.getElementsByTagName("head")[0],(l=t.createElement("link")).rel="stylesheet",l.type="text/css",l.href=i,l.media="all",d.appendChild(l)),o=function(){try{e[a].create(r).catch(function(e){s(e.message)})}catch(e){s(e.message)}},h=!1,y=c,m=function(){h||this.readyState&&"complete"!=this.readyState||(h=!0,o())},(g=t.createElement("script")).type="text/javascript",g.src=y,g.async="true",g.onload=g.onreadystatechange=m,p=g,(u=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,u)}(window,document,"GuestySearchBarWidget","https://s3.amazonaws.com/guesty-frontend-production/search-bar-production.css","https://s3.amazonaws.com/guesty-frontend-production/search-bar-production.js",{"disableCities": true, "siteUrl":"airpeaceofmind.guestybookings.com"});</script></div>

Link to comment
  • Replies 12
  • Views 1.5k
  • Created
  • Last Reply

Can you share link to the page you inserted code? @MarchHouse

Note: Script does not work when you are in editing mode or loggin

Just tried your code on my site. It worked!

Link: https://cylinder-mackerel-pnk5.squarespace.com/accordion2?password=abc

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
15 hours ago, tuanphan said:

Try this code @MarchHouse


section#guesty-search-widget__datepicker input {
    max-height: 20px;
}

 

Many thanks - I changed it to 18px as it works better - its definitely much better - I will go back to guesty with this and see we can improve it still - like the drop down text colours are still different etc - but you have been super helpful - 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.