Created
April 2, 2012 18:50
-
-
Save justinwhall/2286280 to your computer and use it in GitHub Desktop.
PHP : WordPress | Custom 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
//Custom taxonomy | |
function build_taxonomies() { | |
// create a new taxonomy | |
register_taxonomy( | |
'Tax_name', | |
'For_post_ype', | |
array( | |
'label' => __( 'Tax_label' ), | |
'sort' => true, | |
'show_ui' => true, | |
'hierarchical' => true, | |
'args' => array( 'orderby' => 'term_order' ), | |
'rewrite' => array( 'slug' => 'slugname' ) | |
) | |
); | |
} | |
add_action( 'init', 'build_taxonomies' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment