UPDATE: Adding the code I used to create the custom post type and taxonomies.
function create_post_type_properties() {
$labels = array(
'name' => __('Properties', 'properties'),
'singular_name' => __('Property', 'properties'),
'add_new' => __('Add New', 'properties'),
'add_new_item' => __('Add New Property', 'properties'),
'edit' => __('Edit', 'properties'),
'edit_item' => __('Edit Property', 'properties'),
'new_item' => __('New Property', 'properties'),
'view' => __('View Property', 'properties'),
'view_item' => __('View Property', 'properties'),
'search_items' => __('Search Properties', 'properties'),
'not_found' => __('No Properties found', 'properties'),
'not_found_in_trash' => __('No Properties found in Trash', 'properties'),
'parent_item_colon' => '',
'menu_name' => 'Properties'
);
$args = array(
'labels' => $labels,
'description' => 'Properties & property specific data',
'public' => true,
'menu_position' => 5,
'supports' => array('title', 'editor', 'thumbnail', 'custom-fields'),
'taxonomies' => array(''),
'has_archive' => true,
'can_export' => true,
'menu_icon' => plugins_url( 'image.png', __FILE__ ),
);
register_post_type( 'properties', $args );
}
/* Create custom taxonomy (type) for properties */
function property_type_taxonomy() {
$labels = array(
'name' => _x( 'Property Types', 'taxonomy general name' ),
'singular_name' => _x( 'Property Type', 'taxonomy singular name' ),
'search_items' => __( 'Search Property Types' ),
'all_items' => __( 'All Property Types' ),
'parent_item' => __( 'Parent Property Type' ),
'parent_item_colon' => __( 'Parent Property Type:' ),
'edit_item' => __( 'Edit Property Type' ),
'update_item' => __( 'Update Property Type' ),
'add_new_item' => __( 'Add New Property Type' ),
'new_item_name' => __( 'New Property Type' ),
'menu_name' => __( 'Property Types' ),
);
$args = array(
'labels' => $labels,
'show_ui' => true,
'show_tagcloud' => false,
'hierarchical' => true
);
register_taxonomy( 'property_type', 'properties', $args );
}
/* Create custom taxonomy (location) for properties */
function property_location_taxonomy() {
$labels = array(
'name' => _x( 'Property Locations', 'taxonomy general name' ),
'singular_name' => _x( 'Property Location', 'taxonomy singular name' ),
'search_items' => __( 'Search Property Locations' ),
'all_items' => __( 'All Property Locations' ),
'parent_item' => __( 'Parent Property Location' ),
'parent_item_colon' => __( 'Parent Property Location:' ),
'edit_item' => __( 'Edit Property Location' ),
'update_item' => __( 'Update Property Location' ),
'add_new_item' => __( 'Add New Property Location' ),
'new_item_name' => __( 'New Property Location' ),
'menu_name' => __( 'Property Locations' ),
);
$args = array(
'labels' => $labels,
'show_ui' => true,
'show_tagcloud' => false,
'hierarchical' => true
);
register_taxonomy( 'property_location', 'properties', $args );
}