On functions.php
function disallowed_admin_pages() {
global $pagenow;
# Check current admin page.
if ( $pagenow == 'post.php' && isset( $_GET['post'] ) && $_GET['action'] == 'edit' && (get_post_type( $_GET['post']) =='Post_type' )) {
wp_redirect( admin_url( '/edit.php?post_type=post_type&page=page_to_redirct&post=".$_GET["post'] ) );
exit;
}
}
add_action( 'admin_init', 'disallowed_admin_pages' );
page_to_redirect is already created an included in functions.php
Related Posts:
- Show Custom Taxonomy Inside Custom Menu
- Is It Possible To Add Custom Post Type Menu As Another Custom Post Type Sub Menu
- Possible to hide Custom Post Type UI/Menu from specific User Roles?
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Custom Post Type Settings page, choose page to display archive
- WordPress dashboard, viewing CPT results in 504
- Displaying Custom Post Types In “At A Glance” Meta Box
- Put update-like notification bubble on multiple CPTs menus for pending items
- Meta Boxes: ‘admin_init’ or ‘add_meta_boxes’ hook?
- Remove “posts” from admin but show a custom post
- Adding Custom Post Type Counts to the Dashboard
- Can I have Post Types under other Post Types in Admin menu?
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- Is it OK to move admin menu items?
- How Do I Programmatically Better Organize Custom Post Type Menus?
- Add Post type menu to another menu
- How do I create multiple post types in same menu section in WP-admin?
- Is there a way to keep a custom menu expanded when editing a custom post type?
- Menu position (admin menu) of pages
- How to remove/hide elements from the admin menu?
- Remove Custom Post Type menu for non-administrator users.
- How do I code access to the built-in UI of a CPT when it’s placed as submenu of another CPT that is protected by role?
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- Adding help information to custom post edit page
- Custom Post Type and taxonomies’s labels localization not working
- how to only have one custom post type post?
- How can I use a different default admin menu icon for custom post type?
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- How can I show some description in the “All Posts” view of a custom post type in Dashboard?
- How to add new tab to admin list of posts and handle result list
- Displaying different custom post types under one admin menu
- Add custom post types stats to a custom dashboard widget
- Add management screens to post type
- How do I alter the position of a Custom Post Type menu item within my plugin admin menu?
- Sending an email when a CPT is saved/updated (NOT when it’s created)
- How to redirect wp-admin/index.php to a custom post type?
- How to add custom post type under option page
- How to remove default tag and category options form a custom post type admin menu
- Separate comment section for post type in dashboard
- Prevent custom taxonomy from being added to admin menu?
- Trying to add script to specific admin page is not working
- Custom Post Type / Tab Limit
- rewrite custom post type slug in wp admin
- right_now_content_table_end function not working?
- How do increase the amount of links shown down the left in the admin menu?
- Move custom post menu to under plugin admin menu
- Insert & order custom post types in/as submenu
- With two custom post types, how to make one a child of the other in the admin menu?
- Customize the Dashboard Menu Editor
- filter custom post type by meta key in dashboard
- Custom post types as sub menu pages and role capabilities issue
- Team club with CPTs and user registration + user dashboard
- Cluster CPT posts to users based on ACF value from their profile on dashboard
- How to display Custom Taxonomy under Custom Admin Menu?
- Able to edit custom post, but unable to create new custom post when within submenu. What capability is missing?
- Add Custom Post Type as top level menu item for a custom page
- Possibilities for the edit.php admin panel? [closed]
- Add Custom Post type menu to another menu in specific location
- How to remove post listing page for a custom post type
- 2 Different Custom Post Types in Submenu
- Ordering Submenu Pages in WP 3.1
- How to group navigation items in the admin panel
- Conflict between Capabilities and Menu Visibility with Custom Post Types
- Getting post attchment URL to populate a CPT Admin Page Column
- Using menu_position to add two entries between Dashboard and Posts
- How to add query args to links to CPT admin submenu
- List Custom Post Types in Admin Dashboard
- Reusable metabox backend and frontend
- Add data to post edit page, when post is published
- Multiple custom post types showing up in edit.php
- Top level menu position overwrites another entry
- admin_head-post.php only works after publish / update
- Modifying Dashboard edit.php
- Adding link to dashboard sidebar, nested under custom post type
- adding page types in menu
- Metaboxes inside Tab
- allowing custom user role to access custom post type in wordpress admin
- Slow CPT in backend
- Restrict admin pages for specific user role
- Cannot include custom post item within a menu
- Is there a way to display a custom post type menu item as “users” submenu?
- Metabox collapsed by default
- remove duplicate name submenu link from the custom post type
- Custom page for creating/editing custom post type
- Subset of Custom Post Type From Admin Menu Based on Meta Data
- Help Adding filter to Add Media button for custom post type
- How to override post-new.php with custom template
- Setting up a page to house certain types of posts
- Changing menu label to post name for custom post type
- Custom user roles
- Show custom taxonomy not in submenu
- Duplicate “Pages” Item in Admin Menu
- Add role privileges of the custom post type
- How to add elements to WordPress appearance->menu admin?
- creating different edit screens for different roles
- How to avoid hardcoded text in a custom page template?
- Limit number of posts under a post type?
- Custom Post Type Causing Admin Sidebar UI Issue
- Issue on CPT Custom Menu Position in WP