How to exclude categories from get_categories() select list inside a widget admin panel
Per http://codex.wordpress.org/Class_Reference/WP_Query you would need to prefix the numerical identifier of the array with a minus-sign, such as $query = new WP_Query( ‘cat=-12,-34,-56’ );, which would exclude the categories with the identifier 12, 34 and 56. You could achieve this by changing the get_cats function into the following: function get_cats(){ $exclude_cats = array( get_cat_ID(‘test1’), get_cat_ID(‘test2’), … Read more