Title: Hook to create Redirect?
Last modified: August 21, 2016

---

# Hook to create Redirect?

 *  [Evan Mullins](https://wordpress.org/support/users/circlecube/)
 * (@circlecube)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/hook-to-create-redirect/)
 * I have a custom post type that I’d like to auto generate redirects for when new
   posts are published. Is there a hook provided to give access to this? Thanks!
 * [https://wordpress.org/plugins/quick-pagepost-redirect-plugin/](https://wordpress.org/plugins/quick-pagepost-redirect-plugin/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Evan Mullins](https://wordpress.org/support/users/circlecube/)
 * (@circlecube)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/hook-to-create-redirect/#post-4661232)
 * Something like the save_redirects function you have currently at line 784 but
   a way so that when I publish a post I can create one quick redirect for it with
   an on publish hook.
 * My scenario: I have a custom post type that my client wants urls with dashes 
   as usual, but they want to auto generate redirects so the url without dashes 
   will work too. So, my-new-post is the slug and by default the url is example.
   com/cpt-slug/my-new-post they also want the following url to resolve or redirect
   to this post: example.com/mynewpost. I can create quick redirects for each, but
   hoping for a way to do this programatically. So just a way to add one quick redirect
   to the existing.
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Hook to create Redirect?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/quick-pagepost-redirect-plugin_8d7b6f.
   svg)
 * [Quick Page/Post Redirect Plugin](https://wordpress.org/plugins/quick-pagepost-redirect-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quick-pagepost-redirect-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quick-pagepost-redirect-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/quick-pagepost-redirect-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quick-pagepost-redirect-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quick-pagepost-redirect-plugin/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Evan Mullins](https://wordpress.org/support/users/circlecube/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/hook-to-create-redirect/#post-4661232)
 * Status: not resolved