themes - Hi everybody, I have a problem of search box

admin2025-06-03  2

I just finished my site with the theme "shopper" on wordpress with the woocommerce extension. There is a search bar in the header that I can not remove. this bar offers in English to search in categories that no longer exist, it is in English, my site in French but it is not a widget either because I removed them all.

I created a child theme of course. And I do not find the language that could suppress it.

Can anyone help me ? Because I row for a moment on this detail.

I just finished my site with the theme "shopper" on wordpress with the woocommerce extension. There is a search bar in the header that I can not remove. this bar offers in English to search in categories that no longer exist, it is in English, my site in French but it is not a widget either because I removed them all.

I created a child theme of course. And I do not find the language that could suppress it.

Can anyone help me ? Because I row for a moment on this detail.

Share Improve this question asked Feb 19, 2019 at 10:41 jenniferjennifer 1 8
  • Can't you just do display: none in the CSS? – Jos Commented Feb 19, 2019 at 10:51
  • Where I can put this? Yes but it's a little bit invasive method but if it's the only one... – jennifer Commented Feb 19, 2019 at 10:54
  • Surely the Shopper theme provides an "Extra CSS" section where you can put this? Specify the unwanted element as precisely as possible. Experiment using the "Inspect" function of your browser. – Jos Commented Feb 19, 2019 at 11:02
  • I do not think I'm experienced enough to do that. It is well anchored in the theme =( thanks you for your help anyway – jennifer Commented Feb 19, 2019 at 11:15
  • Is the site online? I could give it a try. – Jos Commented Feb 19, 2019 at 11:17
 |  Show 3 more comments

2 Answers 2

Reset to default 1

It must be in the included in the code somewhere. Most search forms will have a search.php or some other variation of that name if it is a custom search (located in the root of your theme).

**EDIT: ** off the back of our short conversation below.

You have used WooCommerce to arrange your products. This means you will want to edit the product search form. This will be located within your /plugins/woocommerce folder the file most likely called product-searchform.php.

You shoulnt edit the form here though as when you update woocommerce you will delete your changes.

You will want to create a folder called woocommerce in the root of your theme. yourtheme/woocommerce. Making a copy of the searchform.php and editing it within this newly created folder.

Rather than changing the theme templates, I would recommend simply hiding the form on the page. You can do this from the Customize page, Extra CSS tab.

In your case, the search bar is enclosed in a <div class="custom-product-search"> so all we need to do is enter:

.custom-product-search {display: none}

to hide the search bar. As this change is stored in the database, it will survive future upgrades of the theme as well.

In case anyone else needs to maintain the site, be sure to include some comments for your successor.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748890351a314574.html

最新回复(0)