Skip to content

Instantly share code, notes, and snippets.

@thecodepoetry
Created July 27, 2015 12:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thecodepoetry/0faaeace6fd456583d94 to your computer and use it in GitHub Desktop.
Save thecodepoetry/0faaeace6fd456583d94 to your computer and use it in GitHub Desktop.
Portfolio category slug
add_filter( 'presscore_taxonomy_dt_portfolio_category_args', 'my_portfolio_category_slug' );
function my_portfolio_category_slug( $taxonomy_args ) {
$taxonomy_args['rewrite'] = array('slug' => 'my-portfolio-category');
return $taxonomy_args;
}
@thecodepoetry
Copy link
Author

Add this code in your child theme functions.php to change portfolio category slug, replace "my-portfolio-category" with your custom slug

@qinjianlan
Copy link

Dear, it doesn't work at all

@mwilson777
Copy link

Worked perfectly -- thanks!

@rafaviana
Copy link

If I want to add the project parent category instead a custom slug, is it possible?
For example:

@DaProp
Copy link

DaProp commented May 13, 2022

Doesn't work

@cdegourcy
Copy link

Doesn't work

That work for me, did you rebuild your URLs (Settings -> Permalinks) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment