View Single Post
Old 06-28-2013, 05:59 PM  
spankalot
Confirmed User
 
spankalot's Avatar
 
Industry Role:
Join Date: Nov 2012
Posts: 107
Simply add following code to your functions.php in theme folder:

Code:
function some_custom_taxonomy_init() {
	// create a new taxonomy
	register_taxonomy(
		'<put_your_taxonomy_name_here>',
		'post',
		array(
			'label' => __( 'People' ),
			'rewrite' => array( 'slug' => '<put_your_taxonomy_slug_here>' ),
			'capabilities' => array(
				'assign_terms' => 'edit_guides',
				'edit_terms' => 'publish_guides'
			)
		)
	);
}
add_action( 'init', 'some_custom_taxonomy_init' );
<put_your_taxonomy_name_here> - change this (this will be the name of custom taxonomy)

<put_your_taxonomy_slug_here> - change this (this will be displayed in link domain.com/this_taxonomy/)

note: this taxonomy will be added to default post type (Post)

name of the functions must be unique, now is "some_custom_taxonomy_init"
__________________
To contact me use email: 4spankalot [at] gmail [dot] com
spankalot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook