How to get category lists by name or slug

If you are looking for specific term objects from the term slugs, from a specific taxonomy, I think new WP_Term_Query() is your best bet: $term_args = array( ‘taxonomy’ => ‘category’, ‘name’ => array( ‘accessibility’,’wcag’, ‘abc’ ) ‘hide_empty’ => false, ‘fields’ => ‘all’, ‘count’ => true, ); $term_query = new WP_Term_Query($term_args); foreach($term_query->terms as $term){ echo ‘<pre>’; … Read more