Created
July 12, 2012 03:16
-
-
Save johndugan/3095457 to your computer and use it in GitHub Desktop.
WordPress: create custom taxonomy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------- | |
// ---------- Create custom taxonomies ---------- | |
// ---------------------------------------------- | |
<?php | |
function custom_taxonomies() { | |
register_taxonomy('collection', 'post', array( | |
'hierarchical' => true, | |
'label' => 'Collections', | |
'query_var' => true, | |
'rewrite' => true | |
)); | |
} | |
add_action('init', 'custom_taxonomies', 0); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment