Custom Taxonomy URL Structure
-
I have a structure like so:
Dining – (Custom Post Type)
dining_types (Custom Taxonomy belonging to Dining Custom Post Type)
-restaurants (term)
-cafes (term)
-delis (term)
-street-vendors (term)I’m trying to programmatically assign custom templates for the following:
-Custom Post Type (Dining) site.com/dining
-Terms of dining_types custom taxonomy (Restaurants) site.com/dining/restaurantsI can get is_post_type_archive to work (site.com/dining), but for whatever reason, I can’t seem to get the taxonomy to work (site.com/dining/restaurants). The page is an archive, but my conditional check isn’t working. I used:
if (is_tax('dining', 'restaurants')) {I’ve tried just doing dining, to see if ALL terms would display in such a way, but no luck. What conditional check do I need to get site.com/dining/restaurants to use a custom archive? Again, dining is the custom post type, restaurants is a “term” of the “dining_types (slug “dining”) custom taxonomy.
The topic ‘Custom Taxonomy URL Structure’ is closed to new replies.