How can I remove the “Add New” button in my custom post type?

Please refer below :

function disable_new_posts() {
    // Hide sidebar link
    global $submenu;
    unset($submenu['edit.php?post_type=CUSTOM_POST_TYPE'][10]);

    // Hide link on listing page
    if (isset($_GET['post_type']) && $_GET['post_type'] == 'CUSTOM_POST_TYPE') {
        echo '<style type="text/css">
        #favorite-actions, .add-new-h2, .tablenav { display:none; }
        </style>';
    }
}
add_action('admin_menu', 'disable_new_posts');

Leave a Comment