Skip to content

Instantly share code, notes, and snippets.

@milohuang
Created November 12, 2011 15:13
Show Gist options
  • Save milohuang/1360653 to your computer and use it in GitHub Desktop.
Save milohuang/1360653 to your computer and use it in GitHub Desktop.
Create Custom Taxonomies
function people_init() {
// create a new taxonomy
register_taxonomy(
'people',
'post',
array(
'label' => __( 'People' ),
'sort' => true,
'args' => array( 'orderby' => 'term_order' ),
'rewrite' => array( 'slug' => 'person' )
)
);
}
add_action( 'init', 'people_init' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment