Add search box to homepage

Highlighted
New Member
5 0 0

I really want a search box to appear on my homepage at www.curatedonline.co.uk and I'm using the Radiance but I can't see any option to add this.

Could anyone enlighten me?

Thanks in advance!

 

 

Greer

0 Likes
Highlighted
Shopify Expert
313 0 6

Using the code below will add a search form for you, now where do you want to add this in your templates!? it's up to you, if you want it on the homepage then you need to add it to index.liquid or you can add it to the theme.liquid template with a condition if template is index then show the form.

<form method="get" action="/search">
    <input type="text" name="q" />
    <input  type="submit" value="Search" />
</form>

Cheers

Alex

www.spicydesign.ca  http://experts.shopify.com/spicydesign
Highlighted
New Member
5 0 0

Cheers for your help Alex.

I actually decided to install the updated Radiance theme instead. You'd think we'd get notified if a theme was updated don't you?! I've got loads of new features which I've wanted for ages including a search box, product categories and even a carousel (which I'm still configuring).

Thanks again

 

Greer

0 Likes
Highlighted
New Member
2 0 2

you can use this code exclusively for Shopify wherever you want to put search box in your site :

{% include 'search-bar' %}

Regards,

Prithweema

Highlighted
New Member
1 0 0

Hi Prithweema

I used youyr tip and added {% include 'search-bar' %} into theme.liquid

This worked once I also created a search-bar.liquid snippet for it to reference.

How would I style the search bar? Would this need to be added style.css asset? Or do I need to create a separate search-bar.css?

Thanks!

George

0 Likes
Highlighted
New Member
3 0 0

is there a way to add this seach box to a specific new page...and it only searches within that page?

 

 

thanks

 

chris

0 Likes
Highlighted
Shopify Partner
3 0 0

Hi,

Where did you  {% include 'search-bar' %} into theme.liquid which line exactly. and how did you create a search-bar.liquid snippet for it to reference.

Can you please give more details on how you did it, please.

Regards


@George_Brooks wrote:

Hi Prithweema

I used youyr tip and added {% include 'search-bar' %} into theme.liquid

This worked once I also created a search-bar.liquid snippet for it to reference.

How would I style the search bar? Would this need to be added style.css asset? Or do I need to create a separate search-bar.css?

Thanks!

George


 

0 Likes
Highlighted
New Member
1 0 0

Can you explain in details (from scratch)?

Like from where to paste the code. etc etc..

0 Likes