Skip to content

Instantly share code, notes, and snippets.

@sethrubenstein
Created October 24, 2013 15:53
Show Gist options
  • Save sethrubenstein/7139760 to your computer and use it in GitHub Desktop.
Save sethrubenstein/7139760 to your computer and use it in GitHub Desktop.
<?php
function name_of_taxonomy_create() {
register_taxonomy(
'your_taxonomy_name',
array('post_types_here'),
array(
'label' => __( 'Your Taxonomy Label' ),
'rewrite' => array( 'slug' => 'your_taxonomy_name', 'with_front' => false ),
'hierarchical' => true,
'show_admin_column' => true
)
);
}
add_action( 'init', 'name_of_taxonomy_create' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment