Hide categories from product listing
-
WC version 2.5.2
Need to hide category listing in product view but would like to keep it in code or just remove it totally.
Tried this but it doesn’t work:
function mango_child_template_loop_product_link_open() { echo '<!-- '; } function mango_child_template_loop_product_link_close() { echo ' //-->'; } remove_action( 'woocommerce_before_subcategory', 'woocommerce_template_loop_category_link_open'); add_action( 'woocommerce_before_subcategory', 'mango_child_template_loop_product_link_open', 10 ); remove_action( 'woocommerce_after_subcategory', 'woocommerce_template_loop_category_link_close' ); add_action( 'woocommerce_after_subcategory', 'mango_child_template_loop_product_link_close', 10 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Hide categories from product listing’ is closed to new replies.