I want to create a directory structure for my WordPress links and for the final page to be based on the taxonomy of the page.
So I have a business that belongs to a city
(meta) and country
(taxonomy). I would like the final URL to be
http://example.com/{country}/{city}/{post_title}/
Is this at all possible? I have tried add_rewrite_rule()
but either it can’t do what I want or I’m doing it wrong (I got rid of the code so I can’t show it, apologies).
Demonstrated here:
http://thereforei.am/2011/10/28/advanced-taxonomy-queries-with-pretty-urls/
Here’s the final code to autogenerate the necessary rules: