Rather than “still on” page the user actually goes to the link and then sent back after post is deleted. From your description and quick look at code this is probably line that sends user back:
wp_redirect( add_query_arg('deleted', 1, $sendback) );
Since destination is filtered inside wp_redirect()
$location = apply_filters( 'wp_redirect', $location, $status );
and you have that ready-made deleted
marker it should be easy to redirect user elsewhere, probably with engineering some checks so that it doesn’t interfere with normal admin operation.
Related Posts:
- Related links – from other sites
- Custom URL redirect in WP
- Problem to get the link of the default ‘post’ post type like the orther custom types
- Linking to the most recent post in a Custom Post Type
- Custom post type redirected to homepage – how to debug
- How to check post type (to include custom css)
- How to customize a permalink (URL) structure?
- Plugin: register custom post types, child ready and performance best practices
- Display only one post each WEEK
- How to Mass Delete Images from Media Library
- Link to full size post thumbnail
- Permalink structure by Post Meta value
- How to integrate video slide using custom post types?
- 301 redirect for converted post type
- redirecting improperly after updating custom taxonomy term when referring from CPT edit page
- A question on creating filters for custom posts using taxonomy
- Conditional Query of Custom Post Type and custom taxonomy
- will post_id ever change? Can I safely use post_id for custom queries?
- List custom taxonomy specific to one custom post type
- Define new user capability for custom post types?
- How to allow visitors to enter custom post type?
- Is it possible to create relational metabox values in a custom post?
- Custom Post Type Query for Sidebar Doesn’t Work on Front Page
- Meta query for custom post type ignored in main query
- Child post with numeric only slug keeps redirecting to parent
- 2 Templates 1 custom post type according url
- How do I move/order posts with a tag to the end?
- changing meta value and meta key of price field
- WordPress sort search results by custom order
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- Hide parent categories when clicked, and show it’s childs
- Custom Path/Folder behind a custom post type
- Time based access control of custom post types – what is good approach?
- Redirect 404 page with ID in slug to associated page with same ID in slug
- Show titles, date of all posts on single category page
- delete_published_posts does not work
- redirect automatic page that serves custom posttype content
- How to start a new post with custom Taxonomies already set?
- WooCommerce sort products by the actual product width(not the shipping width)
- Create a custom php page and load it at a specific slug
- Structure of data : CPT + terms
- How to handle paged param in post and custom-post-type?
- Default text in a specific post type, but not visible?
- Update postmeta Parent when post_status child change
- WP_Query custom post type query not showing the exact post type
- Redirect custom post type category to other custom post type category
- Shortcode to display Staff post type based on Location post type and Specialty post type
- How to remove post listing page for a custom post type
- How to include term custom meta into the custom taxonomy term permalink structure
- How to Get WordPress custom post data in WooCommerce product meta panel? [closed]
- A form that can save/edit after first input
- Adding the_content() in custom template email
- Cannot save CPT meta box
- non-hierarchical post type with hierarchical url structure
- Send notification to the admin when new custom post is submitted
- How do i search authors from search form using author’s name
- Allow users to create posts without logging in?
- How to add attributes to taxonomies that may be different from post to post?
- Pages are not saving due to custom post type
- Migrating a taxonomy’s tags to the native category
- Can slugs from posts and custom post types conflict?
- How to produce a sub-page-system in WordPress
- Some posts from custom post type to subdomains
- Best structure / rewrite rules to achieve the following url
- don’t publish custom post type post if a meta data field isn’t valid
- How does order=asc effect a wp_query (its acting pretty weird in a loop)
- How to sort posts in a custom post type by title in ascending order by default?
- Categorise Custom Post Types
- Detect inside a custom query the kind of post type to assign custom classes
- custom post type vs. conditionally displaying meta boxes for specific terms?
- Edit the_content() function so to add a div wrapper
- How do you make a custom post type items automatically delete items 3 months after publication?
- Changed permalink structure of CPT – should I redirect?
- Custom Post Type & Custom Menu Walker to append custom class for active post types
- Number of posts in the archive
- custom post data – how to
- Ordering Submenu Pages in WP 3.1
- 404 Error on form submission within custom post type
- Remove Quick edit for custom post type?
- Replace dynamically content in a custom database table when a custom post is created
- How to customize work area / admin area in a custom post type without plugins?
- How can I have different content for different countries?
- Redirect to archive is single post has a certain term assigned to it?
- Change “empty trash” button text?
- How to display custom field value on page?
- Move Genesis Single Page/Single Post Title
- Add an Outside Wrapper to my Header and Make it Full Width
- List Categories (wp_terms) and count posts
- Redirect to first child on Custom Post Type (without template)
- Linking to Post Types from wp-admin
- attach CPT data to a taxonomy
- Displaying multiple post types on home page
- Get_the_terms restrict output
- Conflict between wp_list_pages and get_posts – list pages not displaying
- Custom post type menu
- How to insert data into meta box from another plugin?
- why post_class() function apply css classes to all other files?
- WordPress custom API endpoint – how to make the request more flexible
- Create short URL with auto 301 redirect
- Custom post type’s posts are not showing anywere but in xml sitemap