A simple method would be to create a archive template file for the location taxonomy, and then include the proper inner-template for each post type.
First, create a PHP file in your theme’s root folder, named taxonomy-location.php. Then, you can use get_post_type() insider this template the include the proper template:
get_template_part( 'templates', get_post_type() . '-content' );
Now, you can create 2 different PHP files named template-content.php and template-location-content.php. Feel free to edit the to suit your styles.
Related Posts:
- Archive or taxonomy pages not working for custom post type
- Custom post type templating problem
- Getting custom taxonomy posts on archive page
- How to get_queried_object on multiple objects?
- Custom Post Type / Taxonomy Slug / Post Title with post type archive
- Custom Post Type with Nested Taxonomy and Template Files
- Hide child term posts on parent term pages
- Posts per Page on custom Taxonomy Template
- Post type archive page not working
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- Archive page for taxonomy of custom post type
- Should I change these content meta types before building complex archive page?
- Getting taxonomy terms used by custom post type
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- Trying to manage templates on a blog with lots of custom taxonomies
- How to create archive page for taxonomy terms within custom post type
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- Custom post type and taxonomy permalinks – Structure
- taxonomy template for custom post type the same as the archive
- Display only post types that are direct children of the current taxonomy
- Custom Taxonomy term archive template
- How can I filter by taxonomy on a custom post type’s page?
- Custom template won’t load for a custom post type (custom permalinks used)
- Create template for taxonomy results limited by Custom Post Type
- Extending AZIndex plugin to use custom post types and custom taxonomies
- Use Custom Post Type archive page for the taxonomies term archive page
- Display custom post type category, while in a CPT category, then the posts beneath
- Number of Custom Post Types published are not being shown in the custom page
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- WordPress Doesn’t Generate Taxonomy Archive
- posttype/taxonomy/term archive page 404 error
- Custom Post Archive is not working
- What’s the name of the custom post type yearly archive template?
- Alphabetically sort a taxonomy.php template by post title
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- Permalink problems with custom post type and custom taxonomy
- sort CPT on Custom Taxonomy Archive page
- Use the custom post type archive for taxonomies?
- Custom Post type date archive for custom taxonomy
- Show categories of custom post type and not all posts
- Query Posts that have Custom Taxonomy
- Custom Post Type Custom Archive Page Not Working
- Archive page for custom post type and custom taxonomy
- Custom post type category permalinks and archive pages
- Displaying custom taxonomy menu in custom post type archive
- Custom post types templates
- Archive page of taxonomy returns a 404 error
- Archive page of CPT’s custom Taxonomy
- Getting Same Description in All the Custom Taxonomy Posts
- Displaying all posts by category and showing content on click
- pagination problem listing custom post types of taxonomy in wordpress
- Posts per Page on custom Taxonomy Template
- Static Front Page not working for custom theme
- Building Link List for Custom Tax
- Custom taxonomy with custom post type archive page
- Specific template for subcategory of custom taxomy
- Custom Post Type / Taxonomy / Term – what template to use to avoid 404-page?
- taxonomy – templates are not loading
- Templates for CPT not working
- Single taxonomy for different custom post types
- Custom post type post_type_link gives “page not found” on any other custom post type
- Custome post type “tags” pick default archive instead of custom post type archive
- Customize url from the_terms
- Custom post types not displaying per category
- Help with Multi Level Category Archive Page
- Custom post type archive page not showing on archive-posttype.php
- Custom taxonomy in custom post type archive with pagination
- Pagination fault in custom post type archive page [duplicate]
- Custom post type category page not working
- Why is this custom post type defaulting to archive.php?
- title tag for custom post type remove taxonomy name from title tag
- List a custom taxonomy’s terms, with links, on the taxonomy page
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Custom taxonomy archive page not routing?
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- Custom taxonomy meta fields
- How to work with URLs where sometimes a post or a subcategory is in the same part of the URL structure
- Rewrite taxonomy permalink appended to CPT archive url
- Add custom taxonomy to custom post type
- How do I add a custom post type to the Featured Content in twenty fourteen theme?
- Ajax filter with custom taxonomies
- Is there An Input Checkbox Option That Works like `wp_dropdown_categories()` To Use In A WP Search Form?
- Adding Custom Taxonomy Archive Link to Nav Menu Shows Up As (Invalid)
- How to dynamically build a multiple taxonomy query loop within a post type’s single loop?
- CPT Search Form with Taxonomy filter & Or
- Weird problem happening with custom taxonmy when creating/updating posts
- Custom post type not using it’s own single-postname.php
- $wpdb: Counting posts corresponding to 3 terms in 3 different taxonomies
- How to checked selected category checkbox when my custom post inserted from frontend
- List Taxonomy Terms based on another Taxonomy
- Taxonomy/Custom post type structure suggestion on a movie site
- does wp_insert_term link the term to a certain post ID?
- Define multiple prefixes for custom post type
- Order archive custom posts by taxonomy term [duplicate]
- Problem displaying posts for a category in a custom taxonomy
- Loop through multiple custom taxonomy terms and display posts for a custom post type
- Advise on Custom Taxonomies and Structure
- Filtering custom post types using category taxonomy
- How to use wp_set_object_terms depending on page ID?