Desired behavior:
Custom Post Type slug: researchers, students, collaborators
URL: http://domainexample.com/people/researchers, http://domainexample.com/people/students, http://domainexample.com/people/collaborators
Template File: archive-people.php
How should I setup my Custom Post Type to achieve this behavior?
And I wanted to do it without using Taxonomies.
Possible?
Tried to set the has_archive
slug and the rewrite
slug to people/researchers
, and the posts are loaded although the loaded template file still falls to arquive.php.
Current 'researchers' Custom Post Type registration code:
$args = array(
"label" => __( "Researchers", "" ),
"labels" => $labels,
"description" => "",
"public" => true,
"publicly_queryable" => true,
"show_ui" => true,
"show_in_rest" => true,
"rest_base" => "",
"has_archive" => "people/researchers",
"show_in_menu" => true,
"exclude_from_search" => false,
"capability_type" => "post",
"map_meta_cap" => true,
"hierarchical" => false,
"rewrite" => array( "slug" => "people/researchers", "with_front" => true ),
"query_var" => true,
"supports" => array( "title" ),
);
register_post_type("researchers", $args);
Thank you