Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function claue_change_portfolio_slug() {
- // get the arguments of the already-registered taxonomy
- $portfolio_cat_args = get_taxonomy( 'portfolio_cat' ); // returns an object
- // make changes to the args
- // in this example there are three changes
- // again, note that it's an object
- $portfolio_cat_args->show_admin_column = true;
- $portfolio_cat_args->rewrite['slug'] = 'your_new_portfolio_slug_here';
- $portfolio_cat_args->rewrite['with_front'] = false;
- // re-register the taxonomy
- register_taxonomy( 'portfolio_cat', 'your_new_portfolio_slug_here', (array) $portfolio_cat_args );
- }
- // hook it up to 11 so that it overrides the original register_taxonomy function
- add_action( 'init', 'claue_change_portfolio_slug', 11 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement