[wp-meta] [Making WordPress.org] #5519: 301 redirects for new titles in HelpHub
Making WordPress.org
noreply at wordpress.org
Tue Dec 1 11:06:40 UTC 2020
#5519: 301 redirects for new titles in HelpHub
-------------------------+---------------------
Reporter: estelaris | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: HelpHub | Resolution:
Keywords: |
-------------------------+---------------------
Comment (by Otto42):
For cases where the slug changes for a post, WordPress should handle this
by itself, automatically, using the wp_old_slug_redirect() functionality
built into the core. On slug change, the old slug should be saved into
meta as _wp_old_slug and then the wp_old_slug_redirect() will kick in at
template_redirect and send a 301 for that. WordPress has had this built in
since 2.1.
If it doesn't work, then we'd need an example to see why the _wp_old_slug
meta isn't being set properly, or to adjust the post type code to handle
it properly. So, my advice would be to try it on a page and see what
happens, then we can adjust accordingly.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/5519#comment:3>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list