CPT not deleting using UI
-
I created a CPT using the Custom Post Type UI plugin and now I want to delete it. When I go to the edit post types tab and click the ‘delete post type’ button nothing happens. The page just refreshes. Can you please help?
The post type is called ‘recipes’ and I can confirm that I’m running both the latest version of wp (6.5.5) and the latest version of Custom Post Type UI (1.17.0)The page I need help with: [log in to see the link]
-
To be certain, there’s also no admin notification that’s providing an error message of some sort?
Also are you saying it’s still showing in the dropdown for our Add/Edit screen? or it’s still showing in your WP admin menus but not in the dropdown? If that latter example is what you mean, then the same post type could be getting registered elsewhere. If it’s still showing in the dropdown, then see below.
Can you visit the CPTUI > Tools submenu and copy/paste the blob of content on the right hand side for me? I’m curious what your settings are and if I could potentially recreate the issue.
Hi Michael,
Thank you for the quick response.
To clarify (and apologies for not doing so before), after attempting to delete the CPT once the page refreshes there is no admin notification, and it’s still showing in the dropdown for our Add/Edit screen for the post type. It’s also still appear in the left hand side tab of the WordPress dashboard.
I can also confirm that there is no posts (or posts in the trash) for this CPT.
Here is the data drop from the CPTUI tools submenu
{“hunting-trip”:{“name”:”hunting-trip”,”label”:”Hunting Trips”,”singular_label”:”Hunting Trip”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”delete_with_user”:”false”,”show_in_rest”:”true”,”rest_base”:””,”rest_controller_class”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”can_export”:”false”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:”6″,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:”dashicons-pets”,”supports”:[“title”,”editor”,”thumbnail”,”author”],”taxonomies”:[],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit_item”:””,”new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””,”name_admin_bar”:””,”item_published”:””,”item_published_privately”:””,”item_reverted_to_draft”:””,”item_scheduled”:””,”item_updated”:””},”custom_supports”:””,”enter_title_here”:””},”hosted_hunt”:{“name”:”hosted_hunt”,”label”:”Hosted Hunts”,”singular_label”:”Hosted Hunt”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”delete_with_user”:”false”,”show_in_rest”:”true”,”rest_base”:””,”rest_controller_class”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”can_export”:”false”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:”6″,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:”dashicons-location-alt”,”supports”:[“title”,”editor”,”thumbnail”,”author”],”taxonomies”:[],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit_item”:””,”new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””,”name_admin_bar”:””,”item_published”:””,”item_published_privately”:””,”item_reverted_to_draft”:””,”item_scheduled”:””,”item_updated”:””},”custom_supports”:””,”enter_title_here”:””},”event”:{“name”:”event”,”label”:”Events”,”singular_label”:”Event”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”delete_with_user”:”false”,”show_in_rest”:”true”,”rest_base”:””,”rest_controller_class”:””,”rest_namespace”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”can_export”:”true”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:”5″,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:”dashicons-calendar-alt”,”register_meta_box_cb”:null,”supports”:[“title”,”editor”,”thumbnail”,”excerpt”,”author”],”taxonomies”:[“category”],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit_item”:””,”new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””,”name_admin_bar”:””,”item_published”:””,”item_published_privately”:””,”item_reverted_to_draft”:””,”item_trashed”:””,”item_scheduled”:””,”item_updated”:””},”custom_supports”:””,”enter_title_here”:””},”game_trophy_record”:{“name”:”game_trophy_record”,”label”:”Game & Trophy Records”,”singular_label”:”Game & Trophy Record”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”delete_with_user”:”false”,”show_in_rest”:”true”,”rest_base”:””,”rest_controller_class”:””,”rest_namespace”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”can_export”:”true”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:”4″,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:”dashicons-awards”,”register_meta_box_cb”:null,”supports”:[“title”,”editor”,”thumbnail”,”comments”,”author”],”taxonomies”:[],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit_item”:””,”new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””,”name_admin_bar”:””,”item_published”:””,”item_published_privately”:””,”item_reverted_to_draft”:””,”item_scheduled”:””,”item_updated”:””},”custom_supports”:””,”enter_title_here”:””},”newsletter”:{“name”:”newsletter”,”label”:”Newsletters”,”singular_label”:”Newsletter”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”delete_with_user”:”false”,”show_in_rest”:”true”,”rest_base”:””,”rest_controller_class”:””,”rest_namespace”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”can_export”:”false”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:”0″,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:”dashicons-welcome-edit-page”,”register_meta_box_cb”:null,”supports”:[“title”,”editor”,”thumbnail”,”comments”,”author”],”taxonomies”:[“category”,”post_tag”],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit_item”:””,”new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””,”name_admin_bar”:””,”item_published”:””,”item_published_privately”:””,”item_reverted_to_draft”:””,”item_scheduled”:””,”item_updated”:””},”custom_supports”:””,”enter_title_here”:””},”member_profile”:{“name”:”member_profile”,”label”:”Member Hunting Profiles”,”singular_label”:”Member Hunting Profile”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”delete_with_user”:”true”,”show_in_rest”:”true”,”rest_base”:””,”rest_controller_class”:””,”rest_namespace”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”can_export”:”true”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:””,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:”dashicons-admin-users”,”register_meta_box_cb”:null,”supports”:[“title”,”thumbnail”,”author”],”taxonomies”:[],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit_item”:””,”new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””,”name_admin_bar”:””,”item_published”:””,”item_published_privately”:””,”item_reverted_to_draft”:””,”item_scheduled”:””,”item_updated”:””},”custom_supports”:””,”enter_title_here”:””},”discount”:{“name”:”discount”,”label”:”Discounts”,”singular_label”:”Discount”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”delete_with_user”:”false”,”show_in_rest”:”true”,”rest_base”:””,”rest_controller_class”:””,”rest_namespace”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”can_export”:”false”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:””,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:”dashicons-tag”,”register_meta_box_cb”:null,”supports”:[“title”,”editor”,”thumbnail”,”excerpt”],”taxonomies”:[“category”],”labels”:{“menu_name”:””,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit_item”:””,”new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””,”name_admin_bar”:””,”item_published”:””,”item_published_privately”:””,”item_reverted_to_draft”:””,”item_scheduled”:””,”item_updated”:””},”custom_supports”:””,”enter_title_here”:””},”Recipes”:{“name”:”Recipes”,”label”:”Recipes (to delete)”,”singular_label”:”Recipe (to delete)”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”delete_with_user”:”false”,”show_in_rest”:”true”,”rest_base”:””,”rest_controller_class”:””,”rest_namespace”:””,”has_archive”:”true”,”has_archive_string”:”recipes”,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”can_export”:”true”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:””,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:”dashicons-food”,”register_meta_box_cb”:null,”supports”:[“title”,”editor”,”thumbnail”,”comments”,”author”],”taxonomies”:[],”labels”:{“add_new”:”Add New Recipe”,”add_new_item”:”Add New Recipe”,”edit_item”:”Edit Recipe”,”view_item”:”View Recipe”,”view_items”:”View Recipes”,”search_items”:”Search Recipes”,”not_found”:”No Recipes Found”,”menu_name”:””,”all_items”:””,”new_item”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””,”name_admin_bar”:””,”item_published”:””,”item_published_privately”:””,”item_reverted_to_draft”:””,”item_trashed”:””,”item_scheduled”:””,”item_updated”:””},”custom_supports”:””,”enter_title_here”:””},”wild-game-recipe”:{“name”:”wild-game-recipe”,”label”:”Recipes”,”singular_label”:”Recipe”,”description”:””,”public”:”true”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”delete_with_user”:”false”,”show_in_rest”:”true”,”rest_base”:””,”rest_controller_class”:””,”rest_namespace”:””,”has_archive”:”true”,”has_archive_string”:”recipes”,”exclude_from_search”:”false”,”capability_type”:”post”,”hierarchical”:”false”,”can_export”:”true”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:””,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:”dashicons-food”,”register_meta_box_cb”:null,”supports”:[“title”,”editor”,”thumbnail”,”comments”,”author”],”taxonomies”:[],”labels”:{“add_new”:”Add New Recipe”,”add_new_item”:”Add New Recipe”,”edit_item”:”Edit Recipe”,”view_item”:”View Recipe”,”view_items”:”View Recipes”,”search_items”:”Search Recipes”,”not_found”:”No Recipes Found”,”menu_name”:””,”all_items”:””,”new_item”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””,”name_admin_bar”:””,”item_published”:””,”item_published_privately”:””,”item_reverted_to_draft”:””,”item_trashed”:””,”item_scheduled”:””,”item_updated”:””},”custom_supports”:””,”enter_title_here”:””}}Looks like your capitalization is throwing things for a loop there, with the intended to delete recipe post type.
With the provided blob of JSON, thank you for that, I’ve edited it to not have the post type in question. Everything else is still exactly the same. You can use the amended JSON blob found at the link below, to import very much like how you exported it. Just take this version to that same Tools screen, and paste it on the left, and click the “Import” button. This won’t affect any of the content already created, it’ll just update our option value for your post types.
https://gist.github.com/tw2113/47d5920fdc716fe406fb37a18065130f
Thank you Michael that worked! I really appreciate your prompt response and quick solution. I’ll be mindful about ensuring that future slugs don’t use capital letters.
ChrisWelcome.
- The topic ‘CPT not deleting using UI’ is closed to new replies.