I'm making a website which has a page that contains all members. So till now I've made a custom post type using the following code:
function midas_team_post() {
register_post_type( 'midas-team',
array(
'labels' => array(
'name' => 'تیم میداس',
'singular_name' => 'تیم میداس',
'add_new' => 'افزودن ورزشکار',
'add_new_item' => 'افزودن ورزشکار',
'edit_item' => 'ویرایش ورزشکار',
),
'rewrite' => array ( 'slug' => __( 'members' ) ) ,
'public' => true,
'has_archive' => false,
'show_ui' => true,
'menu_icon' => 'dashicons-groups',
'supports' => array( 'title', 'thumbnail' )
)
);
}
add_action( 'init', 'midas_team_post' );
and I've made a template file for it which is called single-midas-team.php and all posts in it have a URL like this: http://localhost/members/{posts}
.
So I want to make option page (let's call it all-members) which is under this custom post type and I'm trying to figure out how to make a different template file for 'all-members' option page and the URL would be something like this: http://localhost/members/all/
and I using this code to add option page for my custom post type:
if( function_exists('acf_add_options_page') ) {
acf_add_options_sub_page(array(
'page_title' => 'تمام اعضا',
'menu_title' => 'تمام اعضا',
'parent_slug' => 'edit.php?post_type=midas-team',
'menu_slug' => 'all',
));
}
*also I'm using ACF Pro.