Last active
March 14, 2017 09:49
-
-
Save jagels/b82cc3a8aac7bce2dd0462a854b7a4a7 to your computer and use it in GitHub Desktop.
Remove a specific category from the category widget (sidebar) in WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Remove the Black friday category from category widget | |
function jagels_exclude_widget_categories($args){ | |
$exclude = "99"; // The IDs of the excluding categories separated by commas. | |
$args["exclude"] = $exclude; | |
return $args; | |
} | |
add_filter('woocommerce_product_categories_widget_args','jagels_exclude_widget_categories'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment