Created
June 1, 2012 03:51
-
-
Save BronsonQuick/2848583 to your computer and use it in GitHub Desktop.
Register WordPress Taxonomy
This file contains hidden or 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
<?php $labels = array( | |
'name' => _x( 'Types', 'taxonomy general name' ), | |
'singular_name' => _x( 'Type', 'taxonomy singular name' ), | |
'search_items' => __( 'Search Types' ), | |
'all_items' => __( 'All Types' ), | |
'parent_item' => __( 'Parent Type' ), | |
'parent_item_colon' => __( 'Parent Type:' ), | |
'edit_item' => __( 'Edit Type' ), | |
'update_item' => __( 'Update Type' ), | |
'add_new_item' => __( 'Add New Type' ), | |
'new_item_name' => __( 'New Type Name' ), | |
'menu_name' => __( 'Type' ), | |
); | |
register_taxonomy( 'section', array( 'discover_item' ), array( | |
'hierarchical' => true, | |
'labels' => $labels, | |
'show_ui' => true, | |
'query_var' => true, | |
'rewrite' => array( 'slug' => 'section' ), | |
));?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment