This question expands the following:

Permalinks: custom post type -> custom taxonomy -> post

This works all well and good... however, I have an existing site that I'm trying to improve and, while I'm able to get the nice pretty URLs for my archive pages (domain/post-type/taxonomy-term), I have two issues.

Issue 1: As this is an existing site, I have links out on social that drive traffic to post URLs that are domain/post-type/post-slug. By implementing the changes at the link about, I now have domain/post-type/taxonomy-term/post-slug. Old links get a 404.

Issue 2: The taxonomy-term is subject to change depending. For example, the term could be "in progress" or "completed", and if that term changes, so does the URL for the post when following the steps outlined in the link above. This, again, breaks the URL for external links.

I understand that default WordPress behavior checks the taxonomy first and then the post type, if it gets to post type at all. But, is there a way to somehow keep my archive page URLs pretty (domain/post-type/taxonomy-term) while keeping my post URLs taxonomy-term free (domain/post-type/post-slug)?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.