-
Author
Tagged: Exclude Category, woocommerce
-
February 25, 2015 at 20:18 #47629bkozlowskiParticipant
Hello,
I’m having a really hard time excluding a category from the “woocommerce product categories widget”. I should just be able to drop this code into functions.php, but for some reason it’s conflicting with something.
Please advise…
COPY CODEadd_filter( 'woocommerce_product_categories_widget_args', 'exclude_product_cat_widget' ); function exclude_product_cat_widget( $args ) { $args['exclude'] = array('16','46'); return $args; }
or…
COPY CODEadd_filter( 'woocommerce_product_categories_widget_args', 'woo_product_cat_widget_args' ); function woo_product_cat_widget_args( $cat_args ) { $cat_args['exclude'] = array('16'); return $cat_args; }
February 25, 2015 at 20:36 #47631sharmstrModeratorI think you’re right about the conflict, but its not with Kleo. I copied your code and it works perfectly for me. Its probably with some other woo plugin you have installed.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 26, 2015 at 18:59 #47826bkozlowskiParticipantI’ve tried loading a fresh copy of KLEO and am still having the problem. It appears the categories are being excluded when the widget is set in the “primary” sidebar. When I add the widget to the “Shop” sidebar I am having the problem.
I think it has something to do with the lib/woo-commerce-plugin/config.php ?
Please advise.
Thanks!
February 26, 2015 at 20:39 #47848sharmstrModeratorAgain. It works for me. No problem in Shop Sidebar.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.