BlackWidow Posted April 7, 2016 Share Posted April 7, 2016 Hi therewould anyone on this post know how to add a search block to the Hayden header? I've tried all the codes above and nothing is working. If someone could help me out, that would be great. Link to comment
Bardurm Posted July 15, 2016 Share Posted July 15, 2016 How would i go about making this work in the BEDFORD template?I've tried to change the code and finding the right ting to input - but nothing seems to work.Has it changed in Squarespace7? Any help would be greatly appreaciated :) Link to comment
Guest Posted November 17, 2016 Share Posted November 17, 2016 Did this make the search bar on your site the way it is now? When I followed silva's instructions and added your tweak, I get the word SEARCH in my navigation bar instead and when you click on it, it sends you to the search page. www.walaowehh.com Link to comment
injicio Posted April 2, 2017 Share Posted April 2, 2017 Can you please help me figure this out for the Hayden Template, Ive tried many times and always fail ): Also what do you mean by site wise injection code? Is that the header, footer, lock page, or order confirmation page? Link to comment
Guest Posted April 13, 2017 Share Posted April 13, 2017 DOES ANYONE KNOW HOW TO DO THIS FOR BEDFORD??? HELP! Link to comment
jdkayden Posted May 15, 2017 Share Posted May 15, 2017 Hi, does anyone know how to get this to work in Jasper? Thanks! Link to comment
DaoEthicalGifts Posted May 6, 2021 Share Posted May 6, 2021 If anyone is interested in getting this to work on the Galapagos template (and any other template if adjustments are made): <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> /* The code here replaces the search link in the navigation bar (which is required) */ /* with the search block which was placed initially in the footer (also required) */ $(".nav-container > ul.nav-list > li:nth-last-child(1) a").replaceWith($(".search-block")); </script> This should be injected at Settings > Advanced > Code Injection > Footer (it needs to run after the Search Block you placed in the footer has been created or else it will not work). If you use another template that doesn't allow search blocks in the header, this should still work, you simply need to inspect the code on your actual webpage (right click > inspect) and search for the class naming conventions your template uses for its <nav> tag and make the necessary changes to the code above. The Galapagos class naming for the navigation bar is .nav-container which has an unordered list (ul) with class name of nav-list which contains list items (li) so you would change those names (add/remove if needed) accordingly to what you find. Link to comment
BDFCommunication Posted May 6, 2021 Share Posted May 6, 2021 For the Marquee template this is the naming convention that works currently: $("#desktopNav > .main-nav > .nav-wrapper > ul.cf > li:nth-last-child(1) a").replaceWith($(".search-block")); $("#desktopNav > .main-nav > .nav-wrapper > ul.cf > li:nth-last-child(1) a").replaceWith($(".search-block")); Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment