Change search box
How do I change the default search box to the woocommerce search
So when is use the search box it shows up like the woocommerce search widget.
I have tried editing searchform.php so that it includes the default search markup but this doesn’t seem to change anything.
Is there anything else that I could do.
Alternatively is there any way of getting a woocommerce search widget which has been added to the header can be displayed on the menu bar.
Thanks for any help.
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
5Hi Matt
At this stage the header search can only be turned on or off. It’s unfortunately not possible to swap that out without child theming and some code understanding. What you could do is turn search off under Theme Settings and then use the header widget area to insert the WooCommerce widget you require.
There is unfortunately no widget area in the menu at the moment.
Hi Andrew would you be able to explain how to do it or link to how to do it with child theming as described above as I feel I have a good understanding of the code.
To keep changes upgrade safe you’d create a child theme:
https://codex.wordpress.org/Child_Themes
Then you’d create a folder called “parts” in your child theme and copy menu.php from the same folder in your parent theme to your child theme. So copy menu.php from parts folder in the parent theme to the same location in the child theme. Copy and paste. Not cut and paste.
Lines 11 to 13 hold the form. You’d need to look into changing the form to search products.
I’d suggest rather researching a plugin like this: https://searchwp.com/ .That’s premium but there could be a free option out there.
Thanks Andrew
I have actually found my own solution by adding the widget to the header and then using translate and changing the z index so that the search box sits ‘above’ the menu.
Awesome, glad to hear you found a solution that works. All the best.
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.