Custom Post Type UI
[resolved] Multiple rewrite slugs for one post type? (5 posts)

  1. relish1227
    Posted 1 year ago #

    Is there a way to have multiple rewrite slugs for one post type?

    Or, is there a way to not have the post type slug be the first slug in a URL?

    My problem is this: I have a product custom post type and it needs to exist in three areas of a site because I have three markets that are pretty mutually exclusive from each other. So, I'd like to have three unique URLs so that I can do different things on each iteration of the page, based on which market section it's in. I also want to take advance of caching and a CDN, so if I just have one URL, then I'm stuck with one static version of the page.

    I'm still thinking through options, but this is one that came to mind -- somehow having three versions of the URL somehow. Having three rewrite slugs might work... or if it was possible to have the CPT slug in a sub-directory.

    Thoughts? Thank you.


  2. relish1227
    Posted 1 year ago #

    Ah, I just realized one thing that helps: the hierarchical setting for the CPT. If I set it to true, then I'm not stuck with a URL like


    When I really want it to be


    So that does answer one part of my post. But, ideally, I'd still like to use the same product record three times (the market being associated with the CPT using a custom taxonomy) and have three unique URLs.

  3. relish1227
    Posted 1 year ago #

    Actually I think I got too excited there. The "Hierarchical" setting only allows me to set the parent of the slug... but the other pages aren't available to be set as the parent. Only other CPTs of the same kind are. So that doesn't really help. Will keep mulling...

  4. relish1227
    Posted 1 year ago #

    Well, I'm going to close this because we've decided to just have three separate records, one for each market. This will be better for SEO and provides some more flexibility, too.

  5. Michael Beckwith
    Plugin Author

    Posted 1 year ago #

    Glad you were able to come to a solution one way or another relish.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic