Forums
Home / Theme: Storefront / Hide search widget on home page without plugin
(@carlos-jaramillo)
8 years, 5 months ago
Hi,
I would love to hide from home page (ID=36) , a search widget that I have on my header …and also clear the space it occupies on that page.
Thanks in advance.
(@anna-webdesign)
Do you have a link?
(@jameskoster)
Hi Carlos,
Your best bet would be to create a new function hooked into init that queries the current page using is_page() then runs;
init
is_page()
remove_action( 'storefront_header', 'storefront_product_search', 40 );
That should do the trick.