Okay
  Public Ticket #4521054
portfolio slug
Open

Comments

  •  1
    ugedafita started the conversation

    Hello,

    How can I change the portfolio slugs? There are no options on Wordpress permalinks settings. Thanks.

    Regards

  •  998
    Neuron replied

    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