I'm using the following code in my backend (functions.php) to generate a list of my categories which can then by inserted into a drop down menu.
/* Get Categories */
$ghostpool_categories_obj = get_categories('hide_empty=0');
$ghostpool_categories = array();
$ghostpool_categories[] = '';
foreach ($ghostpool_categories_obj as $ghostpool_cat) {
$ghostpool_categories[$ghostpool_cat->cat_ID] = $ghostpool_cat->cat_name;
}
array_unshift($ghostpool_categories, "Choose a category");
I'm now trying to do the same for my custom post type categories but cannot figure out how to do it. Any help would be appreciated.