I am unable to get the Parent Taxonomy Terms here is the code i am writing

$myterms = get_terms( 'iqvis_event_category', array( 'parent' => 0 ) );
echo '<pre>'; 
echo '</pre>';

What is the Reason is there any Syntax problem ? or the parent argument is not working?? because if i am not giving the parent argument its working and getting all the terms with their children.

  • i don't see any problem with it. there's no syntax problem. include your results
    – pcarvalho
    Aug 8 '12 at 10:47
  • its nothing all i have to do add another argument 'hide_empty' => 0 then it was returning everything
    – Seeker
    Aug 8 '12 at 10:50
  • @PhpSeeker if that solved your problem, add it as an answer Aug 8 '12 at 13:56
  • Added Already Joseph :)
    – Seeker
    Aug 9 '12 at 3:57

I figured it out I just have to add another argument and then it was working fine:

$myterms = get_terms( 'iqvis_event_category', array( 'parent' => 0, 'hide_empty' => 0 ) );
echo '<pre>'; 
echo '</pre>';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.