There are template filters for all types of queries. You could use archive_template in this case.
function wpd210689_template_filter( $archive_template ) {
$post_types = array( 'america', 'china', 'nepal', 'norway', 'chile' );
if ( is_post_type_archive ( $post_types ) ) {
$archive_template = locate_template( 'archive-country.php' );
}
return $archive_template;
}
add_filter( 'archive_template', 'wpd210689_template_filter' ) ;
Related Posts:
- What does this PHP function code mean? [closed]
- Restrict custom post type to only site administrator role
- Linking Two Post Types
- How to force one column layout on custom post type edit page?
- modify all posts of a category to “no comments allowed”
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- Showing current taxonomy terms
- automatically create taxonomy with same name as post title
- Assigning a role to a specific custom post type (and ignoring other post types)
- Display posts in random post types
- Custom Post Type by user
- saving custom post type data to different table in wordpress
- Query post types with multiple keys
- [Plugin: Posts 2 Posts] Changing display order of connections
- Get all posts WHERE custom_field is LIKE value
- Get the post children count of a post
- How to delete all posts from a custom post type?
- Check Title Unique Or Not and If not error message and dont save
- Remove All, Published and Trashed Post Views in Custom Post Type
- How to post twitter like updates on wordpress
- Show Two custom Post type and their posts on category page
- apply filters only to specific post listing without check the url parameters
- Custom post type and body_class: Remove “blog” class
- Deleting Custom Post type data using mySQL command
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- Display only one post each WEEK
- List custom taxonomy specific to one custom post type
- Meta query for custom post type ignored in main query
- Show titles, date of all posts on single category page
- Update postmeta Parent when post_status child change
- Allow users to create posts without logging in?
- How to sort posts in a custom post type by title in ascending order by default?
- Get_the_terms restrict output
- Custom post type menu
- YOAST SEO won’t work on custom post type archive [closed]
- Separate Content from gallery (custom post type)
- WordPress Count posts within a custom post type
- Custom post type tags not showing in search
- How set template for “custom post type” individual post
- Why is my custom post content only viewable when signed into WordPress?
- Adding specific custom fields (images) to post excerpt
- Limit posts per page depending on the size of a div?
- Delete Post by User
- creating a custom post template
- Problem to get the link of the default ‘post’ post type like the orther custom types
- One Post with different content, depending on a Page
- Custom Post Type
- Display all post types together
- Turn post into simple slideshow
- Query multiple post of which one by taxonomy
- How to make a template for a specific post of a custom post type?
- How to delete unnecessary custom post types in the UI
- How to create a job post by email parsing? [closed]
- show posts under custom post type with same autj
- How to automate the creation of advanced layout article/post
- display posts, pages and custom post types from another wordpress site
- is therer any wordpress function to retrieve a specific html element from post content
- How to develop Knowledge center in WordPress Website
- ACF – Tags not showing up in Custom Post Types
- How to get post content by calling ajax?
- Get category id from post id of a custom post type
- Limit widget to a specific registered sidebar
- WP_List_Table Inside Metabox Not Working on Submit
- Delete all the custom post types when deleting user
- How can I remove categories in menu in custom post type?
- How do I check if a posts status is set to draft or pending?
- How to get all posts except for one post from a certain custom post type?
- List children on child post
- Restrict custom post type from appearing with ?post_types=
- Shortcode not working with post counter
- How to produce a sub-page-system in WordPress
- don’t publish custom post type post if a meta data field isn’t valid
- help
- custom post data – how to
- How to Display Posts From Category Within a Custom Taxonomy?
- Published post auto change status to pending after 90 days
- How to retrieve all wordpress posts (specific type) inside a function in php?
- Automatically update slug with latest title within custom post type [duplicate]
- Modifying the default post from wordpress
- Add custom columns in custom post type browse page
- How to hide a custom field from admin?
- Get terms for a specfic post from multiple taxonomies in custom post type
- Is it possible to have hierarchical taxonomy and hierarchical custom post types in one permalink?
- how to use custom post types collectively integrated with each other
- Create API’s for custom-post types & custom queries using REST or Graphql
- Post template not applying on theme (potentially rendering as Page template)
- custom post type and user post count shortcode
- $_POST from a Meta Box
- CPT: multiple loops with different terms
- Stored meta from attachment, video length?
- How to create a discussion post when a custom post is created?
- WordPress query posts by custom post type not workng
- Hook only specific post type
- Custom Post Type permalink not working on new posts
- Data won’t save on a straightforward metabox, what am I missing?
- Cannot exclude particular post from loop of custom post type
- Apply text based styling done for a single post in WPBakery to all posts / create a template out of it [closed]
- Display code if title of the custom post matches title of other post
- Sort CPT by taxonomy AND THEN by custom field
- Hide load more button if no more post in selected category