Category taxonomy not shown
-
Hello all,
I’m trying to build a form with a dropdown list that contains the list of categories (I don’t want to use the wp_dropdown_categories function because when you click it displays the category)
However, it seems the taxonomy is lost. I mean, all the categories are shown but there is no parent/child grouping.
You can see what I’m saying here:
http://enlaze.net/?page_id=865
Parent categories are “Busco enlaZe” and “Ofrezco enlaZe”. The rest are children and I’d like to have them below “Busco enlaZe” and “Ofrezco enlaZe” depending on their relationships.
The code I’m using is this:
<p id=”et_choose_cat”>
<select name=”drop_cat”>
<?php
$categories = get_categories( apply_filters( ‘elist_taxonomy_categories’, array(
‘hierarchical’ => 1,
‘taxonomy’ => ‘listing_category’,
‘name’ => ‘drop_categories’) ) );foreach ($categories as $category) {
$option = ‘<option value=”‘.$category->cat_name.'”>’;
$option .= $category->cat_name;
$option .= ‘</option>’;
echo $option;
}
?>
</select>
</p>Thank you for your help.
The topic ‘Category taxonomy not shown’ is closed to new replies.