I have this template I purchased and I'm trying to customize.
I added a new taxonomy category called location and I'm trying to replace the default categories being loaded in the theme with my new taxonomy categories.
here's the current code and where it loads the categories:
$cats_array = get_categories('hide_empty=0');
$pages_array = get_pages('hide_empty=0');
$site_pages = array();
$site_cats = array();
foreach ($pages_array as $pagg) {
$site_pages[$pagg->ID] = htmlspecialchars($pagg->post_title);
$pages_ids[] = $pagg->ID;
}
foreach ($cats_array as $categs) {
$site_cats[$categs->cat_ID] = $categs->cat_name;
$cats_ids[] = $categs->cat_ID;
}
array( "name" => "Featured Category",
"id" => $shortname."_feat_cat",
"type" => "select",
"options" => $site_cats,
"desc" => "description"),
Ideally, this change should work:
$cats_array = get_categories('hide_empty=0&taxonomy=location');
but it doesn't! I'm obviously missing something and don't know how to fix this. Any help is appreciated.
Here's the register taxonomy part:
// Register custom taxonomy
register_taxonomy( "location",
array( "woo_estate" ),
array ( "hierarchical" => true,
"label" => "Locations",
'labels' => array( 'name' => __('Locations'),
'singular_name' => __('Location'),
'search_items' => __('Search Real Estate'),
'popular_items' => __('Popular Locations'),
'all_items' => __('All Locations'),
'parent_item' => __('Parent Location'),
'parent_item_colon' => __('Parent Location:'),
'edit_item' => __('Edit Location'),
'update_item' => __('Update Location'),
'add_new_item' => __('Add New Location'),
'new_item_name' => __('New Location Name') ),
'public' => true,
'show_ui' => true,
"rewrite" => true )
);
The pages codes can also be found at:
http://codepad.viper-7.com/4Wkgg3
http://codepad.viper-7.com/n2hZRI
I wasn't able to fix the issue in the end, but instead of using the theme options file to dynamically select the category I want, I used an override code to directly (statically) select the category I wanted and it worked.

$cats_array = get_categories('hide_empty=0&taxonomy=location');return? – Chip Bennett Aug 29 '12 at 13:58null? What? – Chip Bennett Aug 29 '12 at 14:09get_categories()call returns; not what is ultimately output in your markup. Do avar_dump( $cats_array ). – Chip Bennett Aug 29 '12 at 14:15