Jump to content

[Share] Add a Search bar to Navigation

Recommended Posts

You can follow these simple steps to add a Search bar in to Navigation.

If you can't make it work, you can share site url, I will check easier.

image.png.99fee14042607fb95d442af12f6f3996.png

#1. First, you need to edit Site Footer

image.png.9b8f7dd72297f4d6545ac61941c8ff93.png

and add a Search Block

image.png.1acff9fe12926c2d034888ffe39d2468.png

we will have a search like this

image.png.b68f3008a2b8e842c7fb75e6c08c5533.png

#2. Use this code to Code Injection - Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $('footer.sections .search-block').appendTo('nav.header-nav-list');
});
</script>
<style>
nav.header-nav-list {
    flex-wrap: nowrap;
    align-items: center;
}
</style>

image.png.2069c0a765af5a098d4863d06ab64fe9.png

and result

image.png.99fee14042607fb95d442af12f6f3996.png

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
  • Replies 0
  • Views 526
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • 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.