daily pastebin goal
68%
SHARE
TWEET

WooCommerce - Hide a category in the categories widget

lorro Jan 5th, 2016 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // hide a category from the categories widget
  3.   // code goes in functions.php for your child theme
  4.  
  5.   add_filter( 'woocommerce_product_categories_widget_args', 'woo_product_cat_widget_args' );
  6.   function woo_product_cat_widget_args( $cat_args ) {
  7.     $cat_args['exclude'] = array('17');
  8.     return $cat_args;
  9.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top