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
- how to update page without reloading the page builder?
- Slug of a child page is accessible with and without the parent slug in the URL
- Loading custom jQuery and HTML in a WordPress page
- Create a blank admin page from plugin
- Creating multiple pages
- Page loads all pages of the image gallery with pagination
- Create nonce in frontend page to edit profile
- different single.php for different page templates
- Passing variables through a href link from one page to another page
- Add feed to a custom page
- Programatically create multiple pages by passing in array of info
- Directory location of new page
- Grabbing the_content from “about us”
- Page can not be updated and disappeared in “show all page”
- Google indexed pages for one page site
- making a pseudo-static page
- how bbPress and buddypress add their own page templates to the page template drop down on the page editing screen
- How to make page navigation just below the content?
- how to print the content of pages inside the front end area
- All the pages are blank [closed]
- Filter posts by author selected in page
- WordPress, page 2 shows the same posts as page 1
- Temporary download page or restrict static download page based on how the user got to the page?
- How do I make just one of my pages a Blog Page?
- Get ID of the page where shortcode is included
- Standard way of creating profile pages with custom content for each user?
- How to show parent pages on a specific page if user is logged in?
- Hide if subpages are shown
- How to achieve anchor links on top of pages.
- Dynamic content in pages
- Can’t select a page using is_page()
- displaying child pages in columns when on a parent page
- Create custom archive page for individual authors which is separate from the author.php page
- How to exclude page in pages module
- Decouple page name from page title
- get id custom tables on current page
- If searched in a category show different 404 page
- Page redirecting to category (IE only)
- static page with buton that opens collect email form
- Paginate Links not working
- Showing certain page without redirection
- Search page different title per results
- search page different results
- How to add or remove metabox each page separately?
- Approve Page Edits
- Mystery ghost page not appearing in Admin