Comments 1ugedafita started the conversation21 hours agoHello,How can I change the portfolio slugs? There are no options on Wordpress permalinks settings. Thanks.Regards 998Neuron replied16 hours agoHi, You can change the portfolio slug by adding the following code to the functions.php file of the Kanik/Kanikchild theme. function change_portfolio_post_type_slug() { if ( post_type_exists( 'portfolio' ) ) { $post_type = get_post_type_object( 'portfolio' ); $post_type->rewrite['slug'] = 'project'; $post_type->rewrite['with_front'] = false; register_post_type( 'portfolio', (array) $post_type ); } } add_action( 'init', 'change_portfolio_post_type_slug', 20 ); Feel free to ask for anything you need. Kind Regards Sign in to reply ...
Hello,
How can I change the portfolio slugs? There are no options on Wordpress permalinks settings. Thanks.
Regards
Hi,
You can change the portfolio slug by adding the following code to the functions.php file of the Kanik/Kanikchild theme.
function change_portfolio_post_type_slug() { if ( post_type_exists( 'portfolio' ) ) { $post_type = get_post_type_object( 'portfolio' ); $post_type->rewrite['slug'] = 'project'; $post_type->rewrite['with_front'] = false; register_post_type( 'portfolio', (array) $post_type ); } } add_action( 'init', 'change_portfolio_post_type_slug', 20 );Feel free to ask for anything you need.
Kind Regards