1

The widget class uses wp_list_categories() which supports all the parameters for get_terms() like taxonomy which you can use to make the widget lists categories in a taxonomy other than category. So your code would be: add_filter('widget_categories_args', function( $params ) { // $params['post_type'] = array('post', 'recipe'); // post_type is not a ...


1

You can use wp_pluck_list like so: wp_pluck_list($recipe_categories, 'name'); Which should return: array( 'Bread', 'Breakfast', 'Cocktails' )


Only top voted, non community-wiki answers of a minimum length are eligible