Hierarchical taxonomy in permalink structure

Add the value you want before the “meaningful” url variables (city, area, etc) to the slug like this: “uk/([^/]*)/([^/]*)/?$” => ‘index.php?city=$matches[1]&area=$matches[2]&something=$matches[3]’, This way it will only “capture” those URL variables (city, area) if “uk” is at the beginning. A more complete example might look like this //Set up the additional values in the “rewrite rules” … Read more

Filter custom post type by custom taxomony

Ok, so the answer here is both annoying and fairly difficult to find/fix. The wp_dropdown_categories() function outputs the dropdown for each custom taxonomy filter using the term_id as the value for each option. However, when constructing the query the WP_Query::parse_tax_query() method, by default, sets the field element to slug. So, I had to make a … Read more