Install filter using hooks, and hide filter on Shop page

Welcome to Product Filter for WooCommerce article guides.

If you don’t want the filter showing on the shop page this is how you shall achieve that.

Go to the Child Theme functions.php file and use the following code:

	function product_filter_add_12liuyttpoikhg() {
		if ( !is_shop() ) {
			do_action( 'prdctfltr_output' );
	add_action( 'woocommerce_archive_description', 'product_filter_add_12liuyttpoikhg', 50 );

Please note that this code is meant to be only used by professionals. So, it should look something like this:

A NOTE! This will install the filter using a hook action ‘woocommerce_archive_description’ under priority 50. It will check for condition is_shop() which defines is the Shop page showing and then will state an action to install the filter if the Shop isn’t shown. If you’re using widgets this is not an article for you, but you can try the following one.

Read more Product Filter for WooCommerce article guides to learn more!

Leave a Reply

Your email address will not be published. Required fields are marked *