Skip to content

Commit

Permalink
added taxonomy to Staff post type
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjasonweaver committed Apr 9, 2012
1 parent 15cddb4 commit c449486
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion functions.php
Expand Up @@ -737,7 +737,28 @@ function create_staff_post_type() {
)
);
}

// Add new taxonomy, make it hierarchical (like categories)
$labels = array(
'name' => _x( 'Type', 'taxonomy general name' ),
'singular_name' => _x( 'Type', 'taxonomy singular name' ),
'search_items' => __( 'Search Types' ),
'all_items' => __( 'All Types' ),
'parent_item' => __( 'Parent Type' ),
'parent_item_colon' => __( 'Parent Types:' ),
'edit_item' => __( 'Edit Type' ),
'update_item' => __( 'Update Type' ),
'add_new_item' => __( 'Add New Type' ),
'new_item_name' => __( 'New Type Name' ),
);

register_taxonomy( 'types', array( 'staff' ), array(
'hierarchical' => true,
'labels' => $labels, /* NOTICE: Here is where the $labels variable is used */
'show_ui' => true,
'query_var' => true,
'rewrite' => false,
));


}

Expand Down

0 comments on commit c449486

Please sign in to comment.