Making WordPress.org

Opened 4 years ago

Last modified 3 years ago

#5519 new enhancement

301 redirects for new titles in HelpHub

Reported by: estelaris's profile estelaris Owned by:
Milestone: Priority: normal
Component: HelpHub (wordpress.org/documentation) 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 (16)

#1 @estelaris
4 years ago

  • Component changed from General to HelpHub

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


4 years ago

#3 follow-up: @Otto42
4 years 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
4 years 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.


4 years ago

#6 follow-up: @tellyworth
4 years ago

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

#7 @estelaris
4 years 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
4 years 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
4 years ago

#5571 was marked as a duplicate.

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


4 years ago

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


3 years ago

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


3 years ago

#13 follow-up: @tellyworth
3 years ago

@dd32 is this something that could sensibly be handled in the wporg-seo plugin?

#14 in reply to: ↑ 13 @dd32
3 years ago

Replying to tellyworth:

dd32 is this something that could sensibly be handled in the wporg-seo plugin?

It definitely could be.

I don't think it definitely needs to be part of that plugin though, it could be done as a separate one on GitHub to encourage more people to work on it, propose it as a legitimate feature plugin to core, that we happen to be running on WordPress.org. Although perhaps that SEO plugin should be being used for exactly that too.

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


3 years ago

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


3 years ago

Note: See TracTickets for help on using tickets.