-
-
Save sisaacrussell/644fbd60a0417b6722a4355f4679dba1 to your computer and use it in GitHub Desktop.
rename 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
add_action( 'init', 'my_modify_taxonomy', 11 ); | |
function my_modify_taxonomy() { | |
// get the arguments of the already-registered taxonomy | |
$my_category_args = get_taxonomy( 'project_category' ); | |
// make changes | |
$my_category_args->rewrite['slug'] = 'genre'; | |
// re-register the taxonomy | |
register_taxonomy( 'project_category', 'author', (array) $my_category_args ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment