Create Custom Taxonomy

Once you create a custom post type, it’s often helpful to allow for a custom taxonomy to be applied to said post type. Again, WordPress makes this fairly simple. Just paste the following into your functions file and modify the “projects” names to be appropriate for you custom post type.

//Add project types
add_action( 'init', 'project_taxonomies', 0 );
function project_taxonomies() {
	$labels = array(
		'name'                => _x( 'Project Type', 'taxonomy general name' ),
		'singular_name'       => _x( 'Project Type', 'taxonomy singular name' ),
		'search_items'        => __( 'Search Project Types' ),
		'all_items'           => __( 'All Project Types' ),
		'parent_item'         => __( 'Parent Project Type' ),
		'parent_item_colon'   => __( 'Parent Project Type:' ),
		'edit_item'           => __( 'Edit Project Type' ), 
		'update_item'         => __( 'Update Project Type' ),
		'add_new_item'        => __( 'Add New Project Type' ),
		'new_item_name'       => __( 'New Project Type' ),
		'menu_name'           => __( 'Project Type' )
	);
	 $args = array(
		'hierarchical'        => true,
		'labels'              => $labels,
		'show_ui'             => true,
		'show_admin_column'   => true,
		'query_var'           => true,
		'rewrite'             => array( 'slug' => 'project-type' )
	  );
	  register_taxonomy( 'project-type', array( 'projects' ), $args );
}
cw-index-1-r2
goUSF-index-1
usfgm-index-1-r3
bgl-index-1
ucon-index-1-r1
adopt-index-2
skalet-index-1-r2
pcabral
th-index-1
rms-index-2
km-index-1-r1
peu-index-2-r3b
pdu-index-1-r2a
oph-index-1-r2
mmm-index-1
long-index-1-r1a
ernies-index-1
cooks-index-1-r2a
df-index-1-r1
vs-index-1
uni-index-1
pe-wedding-print
Screen shot 2013-10-25 at 3.38.39 PM
fred
cabral
dava
psa
errg
apex
pag
cwb
beginners
awakealive
ecom
ab