RandyMoser
-
Posts
2 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by RandyMoser
-
-
Site URL: https://www.harborcarenh.org/
Hi folks,
Longtime fan, first-time caller here. I inherited responsibilities for a Squarespace website and am much more familiar with Joomla, WordPress and Drupal, but I've found this forum a huge help.
The native Squarespace search engine on this website doesn't work well. I suspect this is due to the architecture of the website -- with LONG index pages containing many other pages, the end result being that the core is somehow confused -- but I thought a workaround would be to install a Google Programmable Search on the site. I've always found that using Google products improves search results, but that may be voodoo.
Unfortunately, I can add the code for this search bar to inside pages (and they load fine), but whenever I bring those pages to the primary navigation or footer position, the system loads a page without the search. Again, this is a guess, but I believe this is an AJAX loading issue conflicting with the Google script. This is what the Google code looks like:
<script async src="https://cse.google.com/cse.js?cx=93d5adf5b23ee11a5"></script>
<div class="gcse-search"></div>Has anyone experienced this issue? Or can anyone suggest why the Squarespace search engine is fairly inept?
Thanks,
Randy
Google Programmable Search on Site (Off Primary Navigation)
in Customize with code
Posted
Ok, Paul2009's article about this issue helped me understand why this is happening. For future generations, the work around appears... to work:
I had tried various forms of this when I first hit this snag, but this one actually works.