Adding custom taxonomy into URL of custom post type
-
I’ve created a custom post type called “knowledge-center”. I also created a custom taxonomy called “agencies” which applies only to the custom post type knowledge-center. The agencies taxonomy is hierarchical.
What I would like to have happen is for the agencies to each have a homepage that shows as /knowledge-center/agency-slug. I’ve been able to do this by simply setting the custom rewrite slug of the taxonomy to /knowledge-center.
The things I havent’ been able to do is have the a child of the agency homepage show up as:
/knowledge-center/agency-slug/sub-agency-slugAnd then a question show up at the URL:
/knowledge-center/agency-slug/questionI’m not quite understanding how to incorporate the taxonomy name into the custom rewrite for an individual question and if it’s possible to incorporate the parent slug into the sub agency url.
How would you do this?
- The topic ‘Adding custom taxonomy into URL of custom post type’ is closed to new replies.