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; }
Hi,
I added the code above to the child theme and saved permalinks, but the slugs are still as the example below
https://northumberlandwi.org.uk/store/wylam/
Please ignore / remove / delete my previous comment, I was working between a test site and a live site so its no wonder updating the test site did not affect the live site!
Works like a dream, thanks for the swift response and sorry for the doh! moment
I added the function script into the child theme and it’s changed the slug but the single location pages are coming back with “page not found”.
Do you have a script that will change the slug for store category pages as well?
You can read here on how to change a custom taxonomy slug.
Hi ! How to also change it in Breadcrumbs ?
Thank you so much !
That is up to your third party plugin or theme who is creating the breadcrumbs.