To change the slug for the custom post type, you need to use this snippet below in your functions.php file, which is available under the child theme.
/*
CHANGE SLUGS OF CUSTOM POST TYPES
*/
/**
* @param $args
* @param $post_type
* @return mixed
*/
function medixer_post_types_slug( $args, $post_type ) {
/*item post type slug*/
if ( 'fw-portfolio' === $post_type ) {
$args['rewrite']['slug'] = 'portfolio';
}
return $args;
}
add_filter( 'register_post_type_args', 'medixer_post_types_slug', 10, 2 );
Remember to save the permalinks again to prevent 404 error after adding this code.