You can set any arbitrary path in the rewrite
slug
and has_archive
arguments:
$args = array(
'rewrite' => array('slug' => 'people/researchers'),
'has_archive' => 'people/researchers',
// other args...
);
EDIT
Your post type slug is researchers
, so WordPress will be looking for the file archive-researchers.php
by default. If you want to force a different template, you can use the archive_template
filter:
function wpd_researchers_archive_template( $archive_template ){
if( is_post_type_archive( 'researchers' ) ){
$archive_template = locate_template( 'archive-people.php' );
}
return $archive_template;
}
add_filter( 'archive_template', 'wpd_researchers_archive_template' );
Related Posts:
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- Page is defaulting to archive page and not designated template
- Custom Post Type Archive URL takes over page URL
- where can I see my custom post type archive template?
- Include different loop templates in search query
- How to show the archive / post type description on Single templates
- Custom template page with custom archives listing by user
- How to modify archive query with pre_get_posts to append CPTs?
- Create template for taxonomy results limited by Custom Post Type
- How can I get this request to use the Custom Post Type page template instead?
- Custom post type posts don’t show in archive widget
- Archive for a Taxonomy of a Custom Post type
- how to remove pages loading with the archive templates
- How can I use archive-{post_type}.php theme template?
- Archive Template being used instead of Category Template for Custom Post Type
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- Turning archive templates to a page template maintaining the slug
- Custom Post Type tag taxonomy “Page Not Found”
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- how to pass args for archive.php query?
- Can I assign a template to a custom post type?
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- Random post, once per day
- Using Templates with Custom Post Type UI
- How to show more posts on an archive page?
- Display all custom post types in archives.php
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- Custom templates for posts like for pages: page-{id} vs single-{id}
- Posts in Multiple Columns and Rows with one single loop
- Removing CPT slug from URL results in 404 error for archive page
- Multiple post types in archives (filter?)
- Display different gutenberg template from selected post attributes
- Custom post type archive sorted and grouped by date in post meta field
- Trying to manage templates on a blog with lots of custom taxonomies
- Having trouble with custom date field for CPT query (WordPress)
- Create second custom 404 page for selected post type
- Custom-post-type-archive: posts sorted/filtered by year?
- Show Two custom Post type and their posts on category page
- Ignore sticky posts if post is not in meta query
- Use get_post_types to query only custom posts types
- Custom Post type is being ignored in query
- Create Template for Custom Post Type same like for Page
- Custom post types archive redirect
- just can’t get date-based archives per post-type to work
- Search / Filter posts on Title/Content OR Tags
- How to get post type and month/year before while loop for date.php file
- Custom taxonomy and custom post type – wrong permalinks and template
- Can I override a CPT template on a per post basis with Gutenberg block editor?
- Custom archive page for CPT UI
- How to display custom post in archive section of the wordpress page?
- Custom taxonomy returns 404
- What’s the equivalent of Hide From Menus on MODX on WordPress?
- Flush Rewrite Rules when new site is created on network
- Custom post type pages return 404 page?
- make permalink go to a custom single.php file
- Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?
- Archive links for custom post types
- Show All Custom Post Types On A Single Archive Page
- Querying a custom post type, but not show duplicates
- Dynamic category name in query post
- Function to limit number of custom post types on homepage – TwentyTen
- Add custom post type to query
- Is possible register two archive pages for single custom post type?
- WP Query from two Custom Post type fields as statement
- Custom Post Type Archive Page showing as 404
- Add custom template ‘sub-page’ to Custom Post type?
- Load info from customposttype into template page
- Creating a custom WP query for a Custom Post Type
- Custom post type single page uses the right template in preview mode but shows a different template after being posted
- Post Attribute Section missing for Custom post type
- How to assign post to category
- Custom taxonomy with custom post type template not showing
- Posts show up under “published” but not “all”
- Values show up in custom home page but not in custom post pages
- Organising custom taxonomies and custom post types
- pagination for a custom query
- Include template if a post is a single product
- Custom nav menu current item custom link problem
- How to decouple custom post types components from template?
- Show Templates in Custom Post Type Editor
- Query Pulling the same post twice
- Parent to another Custom Post Type – Template files not being recognized
- $post breaking container loop
- Stop Custom post type from being searched via URL
- archive-{custom_post_type}.php not getting recognized wordpress
- Pagination in custom loop for custom post type throwing 404 error
- 404 for children in hierarchical custom post type
- Display results from two Custom Post Types in page template
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Using custom post types within a section of a template
- Listing all custom post types using a specific term on the said term’s template page, in groups
- How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?
- Pagination not working for archive
- Problem retrieving custom field for a custom post type
- Only One Post of Custom Post Type Appearing on Template Page
- Choose custom post type template by category
- using a template for more then 1 page
- Why isn’t page attributes dropdown not showing up in a custom post type
- Show custom category archive as front page and remove taxonomy slug from urls