You are searching for Ajax.
This Q&A may give you an idea: Unattaching images from a post.
There are many specialists on the matter here at WPSE, check this search query.
Related Posts:
- Change the text on the Publish button
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Row actions for custom post types?
- Loading External Scripts in Admin but ONLY for a Specific Post Type?
- Register CPTs using Dashicons for admin menu icon in WP 3.8
- How can I remove the “Add New” button in my custom post type?
- Submit post and upload image from front-end
- How to disable generation of default image sizes for some custom post types?
- How can I bulk upload images and automatically create posts for each one at the same time?
- Use a separate upload folder for custom post attachment upload
- Remove “posts” from admin but show a custom post
- Handling front-end file uploads, considering safety and ease of use
- Hide “Add media”, HTML editor from TinyMCE
- Add content in custom post type page after the title and before columns
- Change the edit page for a custom post type?
- How to check if I’m on a custom post type archive in the admin area
- Admin Filter – Add Post Type Description on Post Type Page
- how to group custom post types
- How do I filter the excerpt metabox description in admin?
- How to add custom columns to Custom Post Type admin screen
- Creating a metabox to upload multiple images, Ignoring The Featured Image
- Is it OK to move admin menu items?
- Hide/Show only specific categories in wp-admin new-post.php
- Best way to filter featured image text for a custom post type?
- WordPress Custom Post Type Admin Page really slow
- Set custom upload path for custom post type only?
- Add content before/after admin post wp-list-table
- Custom post type Admin Page
- How to hide CPT files from media library programmatically
- Post slug changed using code doesn’t reflect on editor when post is published
- Add metabox with media uploader in a custom post type [duplicate]
- Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?
- WP Admin default view mode for Custom Post Type
- Remove tabs from media uploader for a CPT
- Remove date and category filters when editing custom post types
- Ordering Post 2 Post admin meta box by meta from CPT
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- how to create my own edit.php admin page code or template for my custom post type
- Removing Image Sizes for Custom Post Type
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- Displaying Post Title on Post Edit page?
- Backend search; include CPT meta?
- Image size filtering in Media uploader according to custom post type
- Rename the insert button in media upload window
- How to programatically set the post title of a CPT on wp-admin
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- Make a custom column sortable, by custom post count
- Sort custom post types by last name in the backend
- Using multiple instances of wp_editor in Custom Post Type admin area
- How i add new link after Edit | Quick Edit | Trash | View in quick edit section
- Custom Post Type Name Causing Problem
- Change upload_dir folder at a certain cpt but cant change back
- How to add post_author column to custom post type
- Use a textarea for a custom post type
- Limit upload by file type only for certain custom post type
- Restrict categories to a custom post type
- Changing the header on post listing page in admin area
- wp is not defined error using wp.media to create a custom image uploader
- How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”
- WordPress User Roles, Custom Post Types, and Admin views
- Add text to post list/edit screens?
- Adding menu_order to CPT admin page
- Remove “Get Shortlink” button in admin of custom post type
- Need functionality with all post list available at edit.php
- Show hierarchical relationship between to custom post types on admin list
- How to redirect from wp-admin/edit.php to a frontend page for specific custom post type?
- exclude admin archive edit screen
- Simple Data picker meta box
- In the admin, how can you list thumbnails instead of titles for a custom post type?
- Make it impossible to save a custom post type with both video and image selected?
- Custom post meta box as a sub form
- Multi Photo Upload with Caption on Front End for Custom Post Type
- How to override post-new.php with custom template
- Group based routing and administration
- Limit Number of Custom Post Type Dashboard
- Add filter button to custom post type in admin area
- “Trash”, “Draft” and count not showing for custom post type in admin panel
- Create Custom Post Type PDF File (Like Media) Then Add Searchable Custom Fields
- Edit is changing my custom’s post type parent id
- Custom Upload Directory for Custom Post Types
- Custom Post Type Pagination Problem in Admin Section
- Custom post type media upload error with custom user role
- Filtering in admin broken for custom post type in 3.8.1?
- Custom post type won’t take my custom fields
- adding a shortcode into a custom post type
- Change the text on the Publish button
- Show a custom field instead of username in the backend author area
- Can’t preview custom post – Redirected to home page
- How to make an admin create/edit post page to look like taxonomy page?
- Show posts of parent in edit.php
- Custom Post Type to Upload Images
- Allow authors to create article image
- admin search of pages returns custom post types
- Changing upload directory and migrating old attachments
- Custom order of CPT posts by title, in wp-admin area by default
- Change CPT Edit Target Link for Admin List
- upload featured image using custom post type
- Display posts of only a certain category in WP Admin section?
- Display box in sidebar of custom post type
- How to set up a private custom post type that is accessible in the administrative dashboard?