Created
May 29, 2016 12:03
-
-
Save ozamancse/1225043fab88d54e2f7cf72e7946f871 to your computer and use it in GitHub Desktop.
Add Category Function
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
function my_theme_custom_post_taxonomy() { | |
register_taxonomy( | |
'myname_cat', 'postname', array( | |
'hierarchical' => true, | |
'label' => 'Categories', | |
'query_var' => true, | |
'show_admin_column' => true, | |
'rewrite' => array( | |
'slug' => 'my-category', | |
'with_front' => true | |
) | |
) | |
); | |
} | |
add_action('init', 'my_theme_custom_post_taxonomy'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment