How to change the store slug URL?

If you want to change a stores slug URL store name, please place the function below into your child theme:

add_filter( 'register_post_type_args', 'wpse247328_register_post_type_args', 10, 2 );
function wpse247328_register_post_type_args( $args, $post_type ) {

    if ( 'stores' === $post_type ) {
        $args['rewrite']['slug'] = 'interactive-map';
    }

    return $args;
}

Deja una respuesta

Tu dirección de correo electrónico no será publicada.