Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove search bar from header
add_action( 'init', 'jk_remove_storefront_header_search' );
function jk_remove_storefront_header_search() {
remove_action( 'storefront_header', 'storefront_product_search', 40 );
}
@alexbrohman

This comment has been minimized.

Copy link

commented Sep 8, 2016

What does 'jk_remove_storefront_header_search' mean? Used this today to remove a WooCommerce search bar. Now that I know how to do it, I'd love to know why it worked.

@jeffmauget

This comment has been minimized.

Copy link

commented Nov 2, 2016

seems simple enoigh but I somehow failed to make this work

@jeffmauget

This comment has been minimized.

Copy link

commented Nov 2, 2016

ok.. I found my error - thanks!

@JuliaMe

This comment has been minimized.

Copy link

commented Jul 19, 2017

I tried this too but it had no affect. Can you tell me how you fixed it please jeffmauget?

@JuliaMe

This comment has been minimized.

Copy link

commented Jul 19, 2017

Or alexbrohman :)Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.