I am trying to get only top level term:
$cat_args = array( 'parent ' => 0, 'number' => 10, 'hide_empty' => false, ); $categories = get_terms( 'question_category' , $cat_args);
But this query return all childterms too, I tried everything but it always get child terms too.
I am trying since last 5 hours and can't find whats wrong in my code, is this a WP bug or there is something wrong in my code ?
Thanks for helping.