Hook into load-{screen_id} and check if the $_GET['trashed'] variable is 1 or above.
add_action('load-edit.php','wpse_trashed_redirect');
function wpse_trashed_redirect(){
$screen = get_current_screen();
if('edit-page' == $screen->id){
if( isset($_GET['trashed']) && intval($_GET['trashed']) >0){
$redirect = add_query_arg(array('page'=>'custom_page_oder', 'trashed' => false, 'ids' => false ));
wp_redirect($redirect);
exit();
}
}
}
This works – and I’m not aware of a better way of doing this…
Related Posts:
- logout redirect only from admin page
- Check IF is a “single product page” and Check the “role” for a Redirect
- How to redirect on particular page in wordpress? [closed]
- Can I display the widget admin in the page admin?
- Change admin startpage to Pages-page?
- Only allow new subpages to be created
- Is there a way to remove or hide individual pages on the Edit Pages screen?
- Where does the 404 redirection happen?
- How to disable Page Attributes dropdown in wp-admin
- Dashboard–> All Pages “How to create folders?”
- How to make certain page templates visible to admin only
- Password Protected Page Not Displaying Content After Entering Password
- Change the Default Pages Menu View in wp-admin
- Redirect “Sorry, you are not allowed to access this page.” to Home
- Add a Menu Link (to a WordPress Page) in the Admin Menu/Sidebar
- How to redirect a page to subdomain?
- Remove pages from backend list *and* update counter accordingly
- Slug is redirecting to 404
- Edit page’s “Restore the backup” link does nothing
- If a page does not exist, include a different page?
- Missing ‘Page Attributes’ in page edit
- How to redirect a page to another?
- Admin pages, edit notes of the title of posts and pages
- Can’t locate a hidden private page
- Role – edit page but not publish
- Page redirects to archive
- Unique page URL redirect to file_get_contents() at domain
- Adding Page URL to the Pages Admin Table
- Change base URL of pages created by certain users
- Redirect page to default subpage
- How to use is_admin in page content?
- Page access only from a specific page in wordpress website
- Change page name in admin list
- WordPress page not taking precedence over server directory
- Is it possible to restrict access to specific pages in the admin area based on the page slug?
- Folder wordpress page redirect
- How to rewrite a page url
- redirect index.html inside folder to wordpress page of same name
- Publish page by invoking submit via jQuery
- How should I set up a Tumblr blog at a WordPress Page?
- accessing the Admin page
- remove “Edit” from select pages
- URL redirect to home page issue in word press site
- WordPress redirects to login page when I enter url.com/index.php
- Cannot use old slug – it just 301s to site home page
- Adding CSS styles to Admin Area PAGES only (not POSTS or CPT)
- Group Pages based on Parent in Admin Area
- disable trashability for certain pages
- Custom admin menu for a selection of pages
- Pages redirect me to the homepage
- How to access variables from one plugin in another
- How to change the default location where new post gets stored?
- How to make a secondary Pages Screen
- Remove element from admin page editing part
- Slug of a child page is accessible with and without the parent slug in the URL
- Create a page without adding a page in the Database
- Restrict admin access to certain pages for certain users
- Require title for pages
- Add a new page to wordpress programmatically
- Get Permalink for the top level parent of child pages
- List all pages and children in separate ul
- How do I load custom scripts and styles for a page?
- WP won’t save changes in post (any)
- Template for child pages / subpages
- Custom page template not working
- How to open a phpBB forum in the same website as sub-page [closed]
- How to setcookie if is_page(‘page’) ? should I use add_action(‘init’) or there is another action?
- Text Editor Tags
- Column Images Showing Gaps
- Wrapping images in tags based on size
- how to display sidebar on pages in wordpress
- Can’t access wp-admin, redirects to http://%24domain/wp-admin/
- page.php is not called, falls back to index.php
- Custom page in archive page for certain category
- Is it possible to check for shortcodes on a page?
- Use same page-mypage.php template for several pages
- How do you implement a page template automatically being applied to a page?
- Make “default” wordpress pages & features unaccessible
- Set a variable to using in redirected page
- add_menu_page does not render the expected result
- WordPress Page Protect forwards to Admin Login
- How can I edit pages from my local environment?
- Can’t login to WordPress admin panel after changing domain to use WordPress pages as a fallback from React
- Prevent users to delete comments from trash
- Why can’t pages be categorized / tagged?
- Adding in additional pages into a custom theme
- List of pages of a specific user
- Multiple meta_key with get_pages
- Sup pages can’t be found
- How to use wp_dropdown_pages or wp_list_pages to accomplish a menu like this?
- Get child pages in get_pages function
- Bundle a page with custom url and a function
- Custom Upload Adds Ghost File
- Widget & storing a Select box choice
- How to Change the path of a child page?
- Redirect preview single post link to a page
- Redirect url in plugin to somewhere else?
- pages won’t show on front page using loop or pre_get_posts
- List of pages – AJAX load more
- How do I count the number of pages a user has seen on my site, and force them to log in after a certain amount