• scdwb

    (@scdwb)


    Hello,

    I would like to use the get_taxonomies function to access a few taxonomies by name. However, the name doesn’t accept an array so I can’t match against multiple taxonomies based on name like this:

    $args = array(
      			'public'   => true,
      			'_builtin' => false,
    			'name' => array('tax_one','tax_two'),
    			);
    
    		$output = 'objects'; // or names
    		$operator = 'and'; // 'and' or 'or'
    
    		$custom_taxonomies = get_taxonomies( $args, $output, $operator );

    I can only do this:

    $args = array(
      			'public'   => true,
      			'_builtin' => false,
    			'name' => 'tax_one',
    			);
    
    		$output = 'objects'; // or names
    		$operator = 'and'; // 'and' or 'or'
    
    		$custom_taxonomies = get_taxonomies( $args, $output, $operator );

    Is there a way of accessing multiple taxonomies based on name?

    Many thanks,
    Steven

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘get_taxonomies’ is closed to new replies.