Okay
  Public Ticket #4521054
portfolio slug
Closed

Comments

  •  1
    ugedafita started the conversation

    Hello,

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

    Regards

  •  1,000
    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


  •  1
    ugedafita replied

    Hello,

    I've implemented the code but it's not working. Look here: https://sad-goldstine.185-186-169-203.plesk.page/project/your-brand-louder/

    Thanks!

  •  1,000
    Neuron replied

    Hi,

    Can you please provide me with your wp-admin, I will have a quick look to see what's going on.

    Feel free to ask for anything you need.

    Kind Regards