WordPress.org

Making WordPress.org

Opened 11 months ago

Last modified 3 weeks ago

#5519 new enhancement

301 redirects for new titles in HelpHub

Reported by: estelaris Owned by:
Milestone: Priority: normal
Component: HelpHub Keywords:
Cc:

Description

As part of the redesign for Helphub, we will change titles for some articles and we would like to know how to proceed. Jono suggested adding 301 redirect links. Are there any steps to that? This is to be done with the make/docs team

Change History (11)

#1 @estelaris
11 months ago

  • Component changed from General to HelpHub

This ticket was mentioned in Slack in #docs by estelaris. View the logs.


11 months ago

#3 follow-up: @Otto42
11 months ago

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.

#4 in reply to: ↑ 3 @dd32
11 months ago

Replying to Otto42:

For cases where the slug changes for a post, WordPress should handle this by itself

Unfortunately, that only works for posts and not pages/hierarchical post types.

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


11 months ago

#6 follow-up: @tellyworth
11 months ago

See https://core.trac.wordpress.org/ticket/4328. Seems like this should be fixed in core.

#7 @estelaris
11 months ago

@tellyworth @dd32 and @Otto42

all of these are very confusing and we in the #docs team will need more guidance.

The post type in the support site is

post_type=helphub_article

An example of the change would be like this:

Original article
Appearance Menus Screen https://wordpress.org/support/article/appearance-menus-screen/

Change to
Create and manage custom menus and that would change the slug to ...article/create-and-manage-custom-menus/

What is the best way to proceed with this change? So far, we have 160 title change suggestions.

#8 in reply to: ↑ 6 @dd32
11 months ago

Replying to tellyworth:

See https://core.trac.wordpress.org/ticket/4328. Seems like this should be fixed in core.

This should be fixed in core, I'm thinking it's probably time that we wrap it up into a plugin that we deploy on WordPress.org for these exact situations, and to dogfood the patch that ultimately will need to go into core.

#9 @dd32
9 months ago

#5571 was marked as a duplicate.

This ticket was mentioned in Slack in #meta by estelaris. View the logs.


9 months ago

This ticket was mentioned in Slack in #docs by estelaris. View the logs.


3 weeks ago

Note: See TracTickets for help on using tickets.