Url and Header Title of page Portfolio

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #772606
    Vincenzo Masciullo

    I do not understand how to change the portfolio url and change the page title(header) “portfolio” in “Gallery”
    Thank you

    J. Davis

    Hi Vincenzo,

    Portfolio is a custom post type and its name and slug (url part) are predefined. You can add the code below to functions.php file of your theme in order to override slug and name:

    function change_portfolio_post_type_slug( $args ) {   
          $args['rewrite']['slug'] = 'gallery';
          $args['labels']['name'] = 'Gallery';
       return $args;
    add_filter( 'cptp_portfolio_register_post_type', 'change_portfolio_post_type_slug', 10, 2 );

    We recommend to install and activate Child theme and add this code to its functions.php file not to loos the changes in case of parent theme update.

    best regards,
    J. Davis

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.