• Hi

    this is my code in which the hierarchy=1 is not working in wordpress2.7, but the same code is working fine in wordpress2.6,Please help me

    My sample code is below

    $source_options = get_categories(‘hide_empty=1&hierarchical=1’);
    foreach ( (array) $source_options as $option2 )
    {
    $parent = $option2->category_parent;
    $title = $option2->name;
    $id = $option2->cat_ID;
    if($parent==0)
    {
    echo $option2->name;
    }
    else
    {
    echo $option2->name;
    }
    }

  • The topic ‘category hierarchy not working’ is closed to new replies.