Our support team is on holiday from January 1st to 7th. Responses may be delayed, but we'll be back on January 8th. Happy Holidays!

Okay
  Public Ticket #3764378
How changing portfolio slug?
Closed

Comments

  • Nicolas started the conversation

    Hello,

    How can I change my portfolio slug from /portfolio/nom-du-projet to /projet/nom-du-projet ?

    Thanks for your help.

  •  949
    Neuron replied

    Hi Nicolas,

    I am very sorry for the late reply, we were not working on the weekend.

    You can change the portfolio slug by adding the following code at the functions.php file of the Ponte/Ponte child 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', $post_type);
        }
    }
    add_action('init', 'change_portfolio_post_type_slug', 20);

    Feel free to ask for anything you need.

    Kind Regards


  • Nicolas replied

    Thanks !

  •  949
    Neuron replied

    You are welcome anytime, feel free to ask for anything you need

    If you like our theme or the support, please leave us a rate of 5 stars at ThemeForest, that would help us a lot.

    Kind Regards,
    NeuronThemes