Get a Taxonomy values in an array
You can retrieve a taxonomies terms with get_terms(). Via their docs: $terms = get_terms( array( ‘taxonomy’ => ‘product_cat’, ‘hide_empty’ => false, )); And it returns: (array|int|WP_Error) List of WP_Term instances and their children. Will return WP_Error, if any of $taxonomies do not exist. Which you can view by doing somthing like echo “<pre>”.print_r($terms,true).”</pre>”;