可以使用此默认函数获得
$args = array(
\'orderby\' => \'name\',
\'order\' => \'ASC\',
\'hide_empty\' => true,
\'exclude\' => array(),
\'exclude_tree\' => array(),
\'include\' => array(),
\'number\' => \'\',
\'fields\' => \'all\',
\'slug\' => \'\',
\'parent\' => \'\',
\'hierarchical\' => true,
\'child_of\' => 0,
\'childless\' => false,
\'get\' => \'\',
\'name__like\' => \'\',
\'description__like\' => \'\',
\'pad_counts\' => false,
\'offset\' => \'\',
\'search\' => \'\',
\'cache_domain\' => \'core\'
);
$terms = get_terms($taxonomies, $args);
有关此链接的更多详细信息:
https://codex.wordpress.org/es:Function_Reference/get_terms