CPT archive admin menu label

I’m using the following code in order to make a cpt:

function midas_team_post() {
register_post_type( ‘midas-team’,
‘labels’ => array(
‘name’ => ‘تیم میداس’,
‘singular_name’ => ‘تیم میداس’,
‘add_new’ => ‘افزودن ورزشکار’,
‘add_new_item’ => ‘افزودن ورزشکار’,
‘edit_item’ => ‘ویرایش ورزشکار’,
‘archives’ => ‘اعضا’
‘rewrite’ => array ( ‘slug’ => __( ‘members’ ) ) ,
‘public’ => true,
‘has_archive’ => true,
‘show_ui’ => true,
‘menu_icon’ => ‘dashicons-groups’,
‘supports’ => array( ‘title’, ‘thumbnail’ ),
add_action( ‘init’, ‘midas_team_post’ );

So when I set has_archive to true in admin menu a sub menu will be created with name like this: {cpt_name} Archive and the problem is that I want to remove that “Archive” form the cpt sub-menu and make it something like this: All {cpt_name}

Read more here:: CPT archive admin menu label

Leave a Reply

Your email address will not be published. Required fields are marked *