Permanent Redirect for custom post type


I have changed the slug for a custom post type from nightlife to socialize so all of my custom posts have moved, for example from:


However, wordpress does not redirect the old custom slug to the new custom slug. How could I write a custom function to do this?

I need this for SEO purposes, otherwise Google will de-index the old URLs if it can’t find them.

JoaMika 3 months 0 Answers 18 views 0

Leave an answer