0

function change_post_types_slug( $args, $post_type ) {
    /*item post type slug*/   
   if ( 'mec-events' === $post_type ) {
      $args['rewrite']['slug'] = 'event';
   }
    return $args;
}
add_filter( 'register_post_type_args', 'change_post_types_slug', 10, 2 );

Jagdish Sarma Asked question June 9, 2021
Add a Comment