Automatically update page permalink on title change
-
Hi,
This is my first post on here, usually I can find what I’m looking for with a bit of Googling, but this time I don’t seem to be able to find an answer.
I have built a multilingual WP site for a client in three languages (using WPML). There are currently about 20 pages for each language and I have simply duplicated each page so that it has the same title and permalink for each language, this is to show the client the site working and how easy it is to switch between each language whilst showing different page content.
Now that the site is about to be handed over to the client, they will need to change the page titles for each language so they are correctly translated. This will obviously mean updating the permalinks too, so that users won’t be seeing the English page permalinks when browsing the site.
I know that if the permalink input field is deleted (and then saved as empty) it will automatically update itself to the page title (providing the page title has been changed first), but the client isn’t particularly tech savvy and has requested that the permalinks update themselves automatically once they’ve changed the page title and hit “Update”, or even before that point.
A snippet of PHP that I can add to functions.php would be the most ideal solution, but if that’s not possible then I’m wondering if there are any plugins out there that will do this? Ideally it would be good to hide the permalink completely when editing a page, so that they don’t even have to worry about it at all, but that’s not really necessary.
Thanks in advance.
The topic ‘Automatically update page permalink on title change’ is closed to new replies.