Using exclude on category listing is busted
I've cloned the default category listing widget开发者_开发知识库 so that I can exclude listing any category whose parent is the default uncategorized category (cat_ID = 1).
Here's my code, however, its not working. I still have items being listed even though their parent category is "uncategorized"...
$cat_args['title_li'] = '';
$cat_args['exclude'] = '1';
wp_list_categories(apply_filters('widget_categories_args', $cat_args));
I may not be understanding exactly what you want to do, but could you not use 'exclude_tree'?
wp_list_categories('title_li=&exclude_tree=1');
精彩评论