sian75 Posted January 14 Posted January 14 Hi! Is there a way to add a search option with an icon in the header? I need my site visitors to able to search older blog posts quickly. Thanks!
Web_Solutions Posted January 14 Posted January 14 4 minutes ago, sian75 said: Hi! Is there a way to add a search option with an icon in the header? I need my site visitors to able to search older blog posts quickly. Thanks! Yes, Add the search block in the footer. Then share your website URL. I'll provide code to move the search block on the header. If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible.
Web_Solutions Posted January 14 Posted January 14 32 minutes ago, sian75 said: I have added the search bar to the footer. Add these code on Code Injection panel in Website > Utilities > Website Tools > Code Injection. Add on the header section. <script src="https://code.jquery.com/jquery-3.5.1.js"></script> <script> $(function(){ let searchBlock = $('.fe-block-yui_3_17_2_1_1705197484910_36207 .sqs-block').attr('id','').addClass('header-search-bar'); $(searchBlock).appendTo($('.header-display-desktop .header-actions--right')); $(searchBlock).clone().insertBefore($('.header-menu-actions .header-menu-actions-action')); }) </script> If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible.
sian75 Posted January 14 Author Posted January 14 It worked but is there a way to just show the search icon to click on to open and not the whole bar? Thanks!
sian75 Posted January 14 Author Posted January 14 The search bar didn't look right as I have a very large logo. Is there a way to have just the search icon visible?
paul2009 Posted January 14 Posted January 14 Take a look at Will's guide here: https://www.will-myers.com/articles/adding-a-search-icon-to-your-site-header Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment