You should add the code you have in team.php
to archive-team.php
. Also, read this.
By default, WordPress matches the id of the custom post type to a file with the name archive-{custom_post_type_id}.php, and if it doesn’t exist it uses the archive.php file.
Related Posts:
- Custom Post Type Settings page, choose page to display archive
- How to get the custom post type from an archive page?
- Loading custom page template via plugin
- Pagination problems with multiple custom post type archive pages
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- WordPress custom post type archive with description
- CPT: archive-cpt.php VS custom page template
- Custom post type and taxonomy permalinks – Structure
- Navigation menus not showing because of custom post type filter
- Rewrite URL for only archive page (custom post type)
- Archive slider for CPT
- How To Create A Custom Taxonomy 404 Page
- Archive template for custom post type only lists first 10
- Change archive page template using pre_get_post
- Custom post type is showing custom home page, not archive page
- Isotope Filtering with Bootstrap Tabs – Custom Post Type Query Loop in each Tab (Have to click twice to filter)
- Why is my site using index.php instead of archive?
- Custom post type archive page blank
- My archive-posttype.php template is not loading
- Custom Post Archive is not working
- Which Template Page Should I Use?
- Display custom post types in wp_list_pages
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- How to integrate single and archive templates for custom post type in any WordPress theme
- Taxonomy template page not working
- CPT with its own category and tag url
- Custom Post Type Archive template not being called
- Can’t replace the default sidebar with a custom sidebar on Custom Post Type in Genesis
- How do I override the default number of items to be listed on an archive.php page? [duplicate]
- Best way for a plugin to define a custom post type archive template?
- Is possible register two archive pages for single custom post type?
- Archive page of CPT’s custom Taxonomy
- Pagination links for custom post type shows correct number of links, but links result in Page not found
- Finding the CPT archive template source
- ACF Pro Accessing fields on a Custom Post Type
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- get first limited words from a custom post in the archive page
- Iterating over custom post type archive returns incorrect first ID
- Show index and not the archive for “Dog Custom Post” with default slug
- Custom post type archive page not showing on archive-posttype.php
- Custom post type with two templates
- How do I make my archive page look like popular reviewing sites (e.g., Polygon and Gamespot) [closed]
- Display custom post type archive on page.php template
- Multiple archives for cpt, taxonomies, terms
- Making a archive gallery page for a custom post type which already has an archive page
- Get Non-Paginated Index of Post in Paginated Query
- How to assign custom post template to its custom taxonomy terms
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Archive templates based on taxonomies
- Organizing Custom Post Type Archive Template
- listing custom post type category page
- Two different archive pages showing the same content
- Archive custom template from search
- how to pass args for archive.php query?
- Pagination not working only on Archive-Name.php using new WP_Query
- How to make posts under custom post type not generate a URL / post
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- Custom Post Type and Taxonomy URL rewrite
- 404 on child page when parent page slug is identical to custom post type
- custom taxonomy – Template not working
- Query current and future events, ordered by begin date
- List Posts of a Custom Post Types Ordered by Terms of a Custom Taxonomy?
- Display users uploaded files as posts
- Is it possible to have dedicated page for parent/child taxonomy?
- Custom post type permalink returns 404
- Different slug taxonomy for two different CPT
- Postname on unique permalink structure appends “-2” for a custom post type. How can I get this to stop happening?
- How do I edit the WordPress post.php file?
- Posts are not rendering perfectly [closed]
- Value of post meta dropdown is not showing in WordPress
- Looping through custom taxonomy and display custom post types (Custom Post Type UI)
- Invalid file type when using wp_upload_bits to upload PDF to a custom post type
- Order posts by taxonomy terms
- Display title of custom post type dynamically
- Work and Display a Custom Post Type as a normal Post
- How to loop custom post type posts by author?
- Looking for advice how to approach building a WordPress plug-in
- Get all posts of any post type in a category from REST API
- Function to Compare CPT Post Custom Value with Default Posts CF Value
- How to automate the creation of advanced layout article/post
- Redirect drafted post of custom post type to URL?
- Custom Post Type with multiple Custom Taxonomies / Hide Taxonomy Slug from URL
- Display code if title of the custom post matches title of other post
- Taxonomy listing issue – does not display how I would like
- Custom archive URL as a subfolder of the custom post type slug
- get_post_types() is returning null
- How to insert a post from a different post type after every nth post
- Sort CPT by taxonomy AND THEN by custom field
- Custom post type disappeared in wordpress when I transferred theme to Showit
- Title- Custom taxonomy by using get_term
- I want to show a list of posts under specified categories
- Complex Custom Loop with Includes
- Sorting by Title for Post Archive Categories for Custom Post Type
- Single custom post type page redirect to 404 page
- How can I show a field ID in Elementor with Request Parameter
- Custom post type single page fine for admin, 404 from front
- How can I incldue a “private” post type in a loop for public users?
- How to automatically compare date from custom post type with current date and change taxonomy based on a result?
- select categories by ids/display terms only selected
- How to exclude a certain CPT from a snippet for Dashboard box?