Taxonomy archive with same slug as custom post type?

You have two avenues:

  • Hardcode rewrite rules for those specific URLs
  • Abandon your quest and design a new URL structure

What your asking for cannot be automated efficiently because it would mean 2 rewrite rules that are the same, but are mapped on to different things. The result being that either the post type slug would take precedence, or the job would take precedence, but only one.

E.g. say we had the url our-people/example, is referring to the people ‘example’ or the job ‘example’? Either WordPress will find the person named example, and 404 if it can’t ( despite there being one under job. Or it will do it the other way around

My Recommendation

Change your URL structure to be less confusing and make more sense by nesting them:

example.com/our-people/johnsmith
example.com/our-people/jobs/managers

do this by setting the rewrite value when you register your jobs taxonomy ( it’s okay to use a / )

Leave a Comment