Тёмный

Search Icon in Header for Squarespace 7.1 

Will Myers
Подписаться 4,5 тыс.
Просмотров 9 тыс.
50% 1

Code: will-myers.com/articles/addin...
/*==== TIMESTAMP ====*/
0:26 - Introduction
2:00 - Installing & Customizing the Plugin
7:00 - Code Review
/* ==== DESCRIPTION ==== */
In this tutorial, we’ll add a search icon to our site header and mobile menu using some javascript. This is an update / remix to my tutorial on adding a search block to your header.
/* ==== USAGE ==== */
Copy the HTML code from the link above into your Settings » Advanced » Code Injection area. Then copy the CSS into your Design » Custom CSS area.
/* ==== ADDITIONAL LINKS ==== */
Plugin Store: www.will-myers.com/products
Learn: www.will-myers.com/newsletter
Newsletter: www.will-myers.com/learn-css-...

Наука

Опубликовано:

 

7 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 65   
@1288webDevelopment
@1288webDevelopment 10 месяцев назад
Can we all just call it like it is: Will Myers is superb. Not only does he give you the code you need in a succinct manner, but he goes above and beyond to teach you about the code as well. Thank you very much, Mr. Myers.
@nielskooloos5726
@nielskooloos5726 Год назад
These tutorials are great. A very specific question I had just got a very specific answer. Thank you so much, Will!
@mfda
@mfda Год назад
Awesome! Thank you for sharing your code with us!
@sullysullivan
@sullysullivan Год назад
Thanks so much! This worked so quickly and easily. Incredibly helpful.
@jesslluttrell
@jesslluttrell Год назад
This is incredibly helpful, thank you for sharing!! And thanks for explaining how it works for us people who know nothing about coding but are maybe wanting to 🤩
@englishconversationschool
@englishconversationschool 2 года назад
Thank you so much Will Myers.
@Jens.Thieme
@Jens.Thieme Год назад
Thanks a ton. Real simple, really well explained, great work and help. Subscribed :)
@wiolettataratuta3153
@wiolettataratuta3153 Год назад
Thank you. Your tutorials help me a lot🚀
@annrichman5628
@annrichman5628 Год назад
Thank you! I have a blog and I really needed a search bar!
@oaspinall1
@oaspinall1 Год назад
Great tutorial and code, thanks Will
@Harrissarena
@Harrissarena 2 месяца назад
This was so helpful. I love this much better than moving my footer to the head and making it a search bar. Thank you thank you thank you
@DanielCclements
@DanielCclements 2 года назад
Great job on the tutorial
@mariagayoso4381
@mariagayoso4381 Год назад
OMG thanks soooo much love your content quick, simple and easy to understand.. I was able to do this in 5 mins on my online store website and had already spent sooooo long trying to figure out how to do it! glad watched ur video Thx again
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport Год назад
Hey Maria, so glad this was helpful!
@simon.stjohn
@simon.stjohn Год назад
Great content Will - nice and clearly explained and made so easy with the code on your site - well done! Subscribed.
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport Год назад
We're really glad you find it useful!
@anazgerardino
@anazgerardino Год назад
Thank you! great tutorial :)
@ashleylauren3367
@ashleylauren3367 Год назад
This was soooooo helpful, thank you! I am designing my nonprofit site myself after being overcharged by developers who didn’t deliver a completed site. 😢This empowered me, gave me exactly what i was looking for, and my website will be complete in a few days ❤
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport Год назад
So glad this was of use to you! Sorry to hear you got let down by your developers!
@user-lg7nz4uy2m
@user-lg7nz4uy2m 3 месяца назад
Thanks Will! :-)
@noahawaii
@noahawaii 2 года назад
Is there a way to make the best of both videos where it doesnʻt navigate you to a search page but rather you can search in a box when you click on the icon like adding a search block on your page?
@samlovesyoga
@samlovesyoga 2 года назад
THANKS!
@lucindademiranda
@lucindademiranda 2 года назад
thanks
@J.MatthewTong
@J.MatthewTong 5 месяцев назад
Thank you so much for this video - tremendously helpful! My "Magnifier" icon has appeared on the far left on the Desktop version, next to my social links - is there any way of moving it to the right a bit or positioning it to the right of my social icons?
@will-myers
@will-myers 4 месяца назад
Hey Matthew, you'll want to adjust where the Social Icon is being injected. At the moment its being added to the beginning of '.header-actions'. You can adjust this on line 19 of the JS.
@sammmmmmmmy
@sammmmmmmmy 9 месяцев назад
thank you so much! may I know how can i add a hover effect on the search icon? i added :hover, but ended up the mouse cursor need to touch the stroke and the len and handle is hover seperately, please help.
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 9 месяцев назад
Hey, unfortunately we can't troubleshoot in the comments, feel free to reach out via our Support page on our site.
@mywolfdesign
@mywolfdesign 8 месяцев назад
THANK YOU! How do I get it to be on the left side of the navigation though vs the right?
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 8 месяцев назад
Hey, you'd need to adjust the positioning on lines 18 & 20 of the Javascript.
@aislingtennyson6544
@aislingtennyson6544 Месяц назад
Thanks for this tutorial! Just wondering can you move search icon to be beside the cart instead of on the menu for mobile? Thanks ☺
@will-myers
@will-myers Месяц назад
Hey, line 27 of the Javascript depicts where this will be positioned on Mobile, you can adjust to your liking!
@charity5709
@charity5709 11 месяцев назад
Amazing video!! Helped me a lot.❤Still one question left. How can I reorder the cart, log in and search icon in the same order like it is shown in your video?
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 11 месяцев назад
Hey, I believe this is just the standard order in Squarespace 7.1. Do you have something else?
@paulshanta8010
@paulshanta8010 8 месяцев назад
Thanks so much Will this is a great help! I've got a seperate Squarespace question please. I'm selling artwork prints online and offering them to be sold in frames also, however I don't wish to offer shipping of the frames internationally only the actual prints internationally. I haven't yet figured out a way to do this within Squarespace and was wondering if you could help please. Ideally it would be something like once the customer enters their shipping details into the checkout and if it is an international country of origin a pop up or something of the like might occur with a message that could be customised stating that product isn't available for international shipping. As that version of the product can't be shipped. Many thanks in advance.
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 8 месяцев назад
Hey, thanks for reaching out! This is a very interesting use case but unfortunately isn't something we have code for.
@hoqhoq7008
@hoqhoq7008 4 месяца назад
thank you so much for uploading these kind of tutorial. its really helpful. however i got one small problem, how can i change the placeholder text for this one? it will be great if you can spare some time to answer this :) have a nice day!
@will-myers
@will-myers 4 месяца назад
Hey, what text is it you're looking to replace?
@staxxwithanotherbeat
@staxxwithanotherbeat Год назад
Thank you so much for the help😊 Is there any way i can make it so the search bar can be used on the home page rather than having to jump to another page?
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport Год назад
Hey, this tutorial only adds the Search Icon to the header, it doesn't have any effect on the search function.
@Ticket4TwoPlease24
@Ticket4TwoPlease24 7 месяцев назад
Hey Will, excellent tutorial, thank you! Any idea on why the size and colour of the icon don't change on my site when I edit the custom CSS? All icons on my site are white, but when I leave it as 'Currentcolor', the icon stays black. I changed the code to 'white', and the icon in the header still stays black?
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 6 месяцев назад
Hey, in order to troubleshoot we'd need to see the site. If you could reach out via our Support Page on our website we can take a look.
@Ooderey
@Ooderey 2 года назад
Hi! Thank you so much for this video! Is there a way to change the place of the icon? For example in the footer, instead of the menu nav. ;-) Thank you for your help!
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 2 года назад
Hey Audrey, this tutorial is just to place it in the header, I'll make a note of this request and we may be able to add this as an option.
@eliasluther9673
@eliasluther9673 4 месяца назад
Does anyone know what this search bar is searching? The search is not very strong. For example, when I search "Episode 20" it pulls it up, but if I search "20" nothing comes up. I would love for the search to be a little more intuitive? In doing some googling I can't seem to find anything to improve search functionality.
@will-myers
@will-myers 4 месяца назад
Unfortunately Squarespace's search function isn't the best, hopefully they'll improve it soon!
@jasonmerrill
@jasonmerrill Год назад
Love this video and code. Any way to disable the search on mobile?
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport Год назад
Hey Jason, try adding 'display: none' under the Mobile Search Icon section of the CSS
@TeMPaHGamin
@TeMPaHGamin 2 года назад
Hi is there any way to move the search icon along the header? my icon is placed on the left side alongside social media icons, I would like it over on the right side.
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 2 года назад
Hey! Yes this is achievable, if you replace '.header-actions' with '.header-actions-action--social' and 'beforebegin' with 'beforeend' this should work! You may want to leave the mobile code as is if you are happy with the placement.
@TeMPaHGamin
@TeMPaHGamin 2 года назад
@@abi-at-WillMyersSupport Hi thank you for the response. I have implemented those changes and the search icon is still showing on the left side.
@mohamedahnaf7349
@mohamedahnaf7349 11 месяцев назад
Is there a way I can make the search icon work on the homepage as an overlay once pressed instead of redirecting to the search page?
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 11 месяцев назад
Hey, we have a code snippet as part of our membership on our website that achieves this.
@mohamedahnaf7349
@mohamedahnaf7349 11 месяцев назад
@@abi-at-WillMyersSupport could you link me to it
@user-bn8rb7br9v
@user-bn8rb7br9v 8 месяцев назад
Thanks for the video! I have added the code to my website. Now, Is there a way to find what people are searching for in my website, the search terms?
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 8 месяцев назад
Hey, yep there sure is! If you go to Analytics > Engagement > Site Search Keywords
@user-bn8rb7br9v
@user-bn8rb7br9v 8 месяцев назад
@@abi-at-WillMyersSupport Thank you. I also would like to know how to reduce size of the search bar in desktop view. Its too big!
@mariagayoso4381
@mariagayoso4381 6 месяцев назад
Hello Will, my search icon has randomly disappeared from the mobile version. It is still on the desktop still tho. I am desperate not sure what to do?? I still have the same code(your html) on my code injection in the footer section. Any help is greatly appreciated.
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 5 месяцев назад
Hey, Squarespace have recently made some changes. Social Icons will now need to be enabled in the Navigation Bar for this icon to display on mobile.
@oli9384
@oli9384 5 месяцев назад
@@abi-at-WillMyersSupport Hi Will. Thanks! I have the same problem for the mobile version. I can not find the possibility to enable the icon in the navigation bar. do you have a new solution? that would be awesome. thanks a lot.
@michaelks3387
@michaelks3387 4 месяца назад
What can you search?
@will-myers
@will-myers 4 месяца назад
You can check out Squarespace's documentation on this here - support.squarespace.com/hc/en-us/articles/217594457-Adding-search-to-your-site?platform=v6&websiteId=5dec0d775605ee7848f9f1e6#toc-indexed-content
@bnaignacio4722
@bnaignacio4722 10 месяцев назад
HELP it's not showing any search results
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 10 месяцев назад
Hey, our code doesn't adjust the search functionality, but we can take a look if you reach out via the Support Page on our website.
@user-kr9lp8rt7i
@user-kr9lp8rt7i Год назад
Does not work on my account ):
@abi-at-WillMyersSupport
@abi-at-WillMyersSupport 11 месяцев назад
Hey, sorry for the delay in our reply, we've been having a bit of trouble with RU-vid comments! If you're still having trouble with this feel free to reach out via our Support page on our website and we can take a closer look.
Далее
Super Easy Mega Menu for Squarespace 7.1
18:42
Просмотров 14 тыс.
Adding a Search Bar To The Header in Squarespace 7.1
4:05
Squarespace SEO: Major Changes Coming In 2024
19:33
Просмотров 9 тыс.
Avoid these 5 beginner CSS mistakes
21:38
Просмотров 79 тыс.
Squarespace CSS Deep Dive: Adding SVG Icons to Buttons
17:05
The Clever Way to Count Tanks - Numberphile
16:45
Просмотров 791 тыс.
Squarespace How to Add Icons to Your Website
14:03
Просмотров 6 тыс.
The secret to mastering CSS layouts
17:11
Просмотров 274 тыс.
КАКОЙ SAMSUNG КУПИТЬ В 2024 ГОДУ
14:59
Cool Gaming PC Build! #shorts
1:00
Просмотров 4,6 млн