• Resolved Erwin

    (@onstudio)


    Is there a way to exclude a taxonomy term being displayed in the filter?
    I’ve got a term ‘featured’ which, when ticked, displays posts on the home page. But ideally I don’t want to use it in the filter drop downs.

    • This topic was modified 9 years, 2 months ago by Erwin.
Viewing 1 replies (of 1 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Erwin,

    Sure you can. There’s a filter to modify any arguments supplied to the wp_dropdown_categories function for each dropdown.

    So to exclude one or more terms just hook into the filter:

    
    function btf_modify_categories_dropdown’( $args, $taxonomy ) {
    	$args['exclude'] = 'TERMID';
        return $args;
    }
    add_filter( 'beautiful_filters_dropdown_categories', 'btf_modify_categories_dropdown’, 10, 2 );
    

    Change TERMID to your term “featured” id.
    Best of luck!

Viewing 1 replies (of 1 total)

The topic ‘Exclude a taxonomy term’ is closed to new replies.