تست بکنید :
- - - Updated - - -کد:$args=array( 'name' => 'cs_locations' ); $output = 'objects'; $taxonomies=get_taxonomies($args,$output); if ($taxonomies) { foreach ($taxonomies as $taxonomy ) { echo '<p>' . $taxonomy->name . '</p>'; } }
این برای گرفتن تمامی term های یک taxonomy :
کد:$terms = get_terms( array( 'taxonomy' => 'cs_locations', 'hide_empty' => false, ) ); foreach ($terms as $k) { echo $k->name; }