You seems to assume that it would grab archive for first of multiple post types. But why? Order in this case does not indicate any kind of priority.
WP seems to consider that logical as well. If you take a look at get_archive_template()
the individual template will only be considered if there is only one post type in query.
Multiple post types in query will cause archive.php
to load, as you are observing.
If you want to load more specific template, you would need to override that via filters as well, for example with archive_template
one (dynamic one in get_query_template()
).
Related Posts:
- $query->set in pre_get_posts is unintentionally affecting the backend
- Add Custom Post Type to Current Query
- How to show more posts on an archive page?
- Custom post type with tags
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Custom post type posts don’t show in archive widget
- Query multiple taxonomies with pre get posts
- Custom Post Type setup
- pre_get_posts works in post type archive but not in single post
- Pagination not working with custom loop
- Custom Post Type Archives by Year & Month?
- Get custom post type slug for an archive page
- Get the ID of the latest post
- Custom post type pagination 404 fix?
- Adding content to archive and taxonomy pages on custom post types?
- Filtering a custom post type by custom taxonomy in archive template
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- get term archive url / link
- Prevent pre_get_posts filter on specific post type
- How to get the custom post type from an archive page?
- How to remove “Archive:” label from archive title
- Why are posts from custom post type not displayed in “category” archive?
- Custom Post Type Archives by Date and Taxonomy
- Sort custom post type list table by display name of a user id stored as post meta value
- How to use a custom post type as front page?
- Displaying category archive of custom post types
- Custom post types – Use post_id in permalink structure when using has_archive => true
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- Random post, once per day
- get attachments for all posts of particular post type
- Pagination throws 404 error on custom taxonomy archive pages
- Setting up custom post type archives in WP3.1? Any luck?
- Proper way of making custom post type landing page or archive page
- Query custom post type by custom field
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- Custom Post Type Archives by Date with Custom Permalink
- Filter for “get_post_type_archive_link()”
- How to put custom post types on front page
- How to add meta box to backend menu page
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- Change title in head on Archive page
- Display Editable Text Above CPT Archive Listings
- Custom Post Type Archives with 0 Posts Redirects as 404
- Archive page with multiple taxonomies rewrite
- Include post id[s] into WP_Query()
- Custom Queries: Joining On Meta Values From Two Custom Post Types
- Pre get posts for single post
- Multiple Paginations on one Page
- Create permalink structure for one taxonomy archive per custom post type
- Archive page…limiting posts per page
- WP 3.1 – archive pages for custom content types possible now without a plugin?
- Page is defaulting to archive page and not designated template
- Date archives for custom post type
- How to get my Custom Post Type to display in Recent Posts using “pre_get_posts”
- Custom Post Type Archive URL takes over page URL
- Custom comment status possible?
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Display all custom post types in archives.php
- Pre_get_posts Gives 404 on Custom Post Type
- How to Add Pages Under Custom Post Type URL Structure?
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- WordPress custom post type category pagination 404 Error
- filter search result with custom post type meta key
- Order posts by (hierarchical custom) taxonomy terms and term children
- Custom Permalinks for Custom post Type Archives?
- Meta Query “IN” doesn’t work with ACF checkbox filter
- is_singular won’t call my functions?
- Show Custom Post Type by Author
- Custom post type archive with pagination?
- SQL to update custom post taxonomies
- Custom post type tag archives don’t work for basic loop?
- How Do I Use WP_Query to Run This Database Query as Search Result?
- Query multiple taxonomy in Custom Post Type
- Removing CPT slug from URL results in 404 error for archive page
- Multiple post types in archives (filter?)
- Querying Posts by Taxonomy From Alternate Network Site
- Pages, Custom Posts & Custom Taxonomy defining slug structure
- How to show a tag archive of one post type only
- Custom Search | Wrong output & question
- How to let custom post type posts show in standard post archive (like in homepage)?
- Regex problem in an add_rewrite_rule
- paginate function in archive for custom-post-type
- Limiting number of custom posts shown on taxonomy page
- Get the most popular terms for a custom post type
- Custom taxonomy archive page not working
- Query by 2 values of a repeater ACF field
- Include custom post type in “all posts”
- Include Custom Posts Type in Year/Month/Date Archive
- Change plugin’s has_archive = true to false?
- where can I see my custom post type archive template?
- show posts only on homepage but using custom post type and taxonomy for query posts via url
- Can’t sort order of wp_query with 2 meta keys
- wrong template for page of archive
- Sort custom post types by last name in the backend
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- WP insert post PHP function dynamically generated Custom Fields
- Displaying custom post type on category pages but not on blog listings
- Include both default and Custom Post Type in query modified inside pre_get_posts
- How to show multiple post types on taxonomy archive?