I'm running a property site where many properties are sold in apartment blocks.
Because of this what the content editors do is create a post/property with all the details and then use a duplicate post plugin to create the others.
Each time they duplicate a post/property they change the title to reflect the property number and maybe change a few bits of meta data E.G price.
What they forget to do is wipe out the slug and let a new one be generated from the title. Here is an example slug from the first property entered:
but then when they duplicate the slugs become:
But when they change the titles the slugs would be better like:
So my question:
How do I force the slug to be re-generated on post save, after they have updated the property title?
The slug for this CPT should always be auto generated, there is never a need to manually set it.