I want to show a dropdown in the option's panel for choosing a "featured product category" which is a custom taxonomy. I do this way:
register_taxonomy("Catalogs",
array("kmproduct"),
array("hierarchical" => true,
"label" => "Catalogs",
"singular_label" => "catalog",
"rewrite" => true ));
and in my theme_options.php i have:
...
array( "name" => "Homepage featured category",
"desc" => "Choose a category from which featured posts are drawn",
"id" => $shortname."_feat_cat",
"type" => "select",
"options" => $wp_tax,
"std" => "Choose a category"),
and I can't get the taxonomies list:
$args=array( 'name' => 'Catalogs');
$output = 'names'; // or objects
$taxonomies = get_taxonomies($args,$output);
$wp_tax = array();
foreach ($taxonomies as $category_list ) {
$wp_tax[$category_list->ID] = $category_list->name;
}
array_unshift($wp_tax, "Choose a category");
What's wrong? I can't get it to work :(