A WordPress installation with a custom theme
Custom post type: product
Custom taxonomies (for product):
- area [hospital, restaurant, cleaning, ...]
- group: [skirts, pants, hats, jackets, ...]
- suitability [women, men]
There is a custom product catalog page-template, with three select boxes as the search filters:
Everything works fine, but the url is like this:
I would prefer:
I was able to make this happen (partly) by using an archive-page and setting the Category base as
catalog/%area%/%group%/%suitability%/%product% in WordPress Permalink Settings, but now I have a following problem:
For example, if I want to display all the kitchen hats for men, I would use:
/catalog/kitchen/hats/men. But what if I want to display all the kitchen products for men (from every product group), I would like to use:
/catalog/kitchen/men. Obviously, this doesn't work because there is no product group called
men (it's a suitability term).
Does anyone have ideas what should I learn and from where? In the end I would like to know how this is done in code (without plugins).
All the help and suggestions much appreciated, thank you.