get_terms : query by exact term_name, help needed
I cannot making it work.
I have the following custom taxonomy structure (category like) :
\–My Sub Term Parent A
\–My Sub Term Parent Abis
Now I want to get the FIRST sub-term object so I query like that:
$query_term = array( 'parent' => 804, // id of term "A" 'search' => esc_attr("My Sub Term Parent A") ); $cat_term_obj = get_terms($my_tax, $query_term);
The problem is it doesn’t allow me to retrieve the exact match of the queried term name. It retrieves nothing (null). I tried with name__like parameter but it’s the same.
Is there a way to retrieve a term in a custom taxonomy name, b ased on the exact term name ?
Thank you for your help,
- The topic ‘get_terms : query by exact term_name, help needed’ is closed to new replies.