bellows_auto_terms_query_args

Knowledgebase Docs » Bellows
USEFUL? 2

bellows_auto_terms_query_args

This filter allows you to filter the get_terms() query arguments for Taxonomy Term Hierarchy Autopopulation menus

$query_args
An array of query arguments to be passed to get_terms(). The filter callback should return $query_args. For a full list of parameters that can be passed, please see The WordPress Codex: WP Term Query Parameters

Example: Show public private posts to logged in users

The following would exclude terms 22 and 67 from appearing in the menu.

function bam_exclude_terms( $query_args ){
	$query_args['exclude'] = array( 22 , 67 );
	return $query_args;
}
add_filter( 'bellows_auto_terms_query_args' , 'bam_exclude_terms' );