Doing this search, I’ve found this fine answer by Chris_O. There’s even a jQuery solution I proposed there.
Anyway, the function remove_menu_page('edit.php');
only removes the Posts menu.
But, as we learn from Chris answer, remove_menu_page('edit.php?post_type=athletes');
removes the Custom Post Type menu.
To really block access to the URL, as we’re merely hiding the menu item, check the following Q&A: Blocking Administrative Access to Authors and Subcribers?
Related Posts:
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Is it OK to move admin menu items?
- How do increase the amount of links shown down the left in the admin menu?
- Possibilities for the edit.php admin panel? [closed]
- How to override post-new.php with custom template
- Is It Possible To Add Custom Post Type Menu As Another Custom Post Type Sub Menu
- How can I remove the “Add New” button in my custom post type?
- Change the edit page for a custom post type?
- Admin Filter – Add Post Type Description on Post Type Page
- How do I filter the excerpt metabox description in admin?
- How to add custom columns to Custom Post Type admin screen
- WordPress Custom Post Type Admin Page really slow
- Post slug changed using code doesn’t reflect on editor when post is published
- Add Post type menu to another menu
- WP Admin default view mode for Custom Post Type
- How do I create multiple post types in same menu section in WP-admin?
- Remove date and category filters when editing custom post types
- Ordering Post 2 Post admin meta box by meta from CPT
- Remove Custom Post Type menu for non-administrator users.
- How to programatically set the post title of a CPT on wp-admin
- Make a custom column sortable, by custom post count
- 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
- How to add post_author column to custom post type
- Use a textarea for a custom post type
- how to only have one custom post type post?
- Restrict categories to a custom post type
- How can I use a different default admin menu icon for custom post type?
- WordPress User Roles, Custom Post Types, and Admin views
- Need functionality with all post list available at edit.php
- Show Custom Post Type values in WordPress grid view
- How do I alter the position of a Custom Post Type menu item within my plugin admin menu?
- How to remove ‘create new post’ entry for a custom post type?
- How to customize admin posts based on the user who is logged in
- How to add custom post type under option page
- Trying to add script to specific admin page is not working
- Change headers in admin posts list
- Custom Post Type + 20k posts = blank/404 within Admin edit.php [duplicate]
- Remove rows in the manage post/page view
- Admin not showing all custom post type posts and views not working
- Display post meta on edit page in admin
- Insert & order custom post types in/as submenu
- Admin Pointers on a custom post type
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- Add Custom Post type menu to another menu in specific location
- Filter hierarchical custom post type admin page by parent, and include children & grandchildren
- Admin Filter – Add Post Type Description on Post Type Page
- Custom post type editor with dynamic selects, one drop down populating a second second drop down not working
- WP-ADMIN – Listing all CPT in “posts” listing
- Custom Postype specific changes in admin panel
- It’s possible to hide body copy box for a custom post type?
- Show data from one Custom Post Type in another Custom Post Type
- Add a custom text to admin footer in a Custom Post Type page
- Set thumbnail and title for a post type archive (not post itself!)
- Custom WP_Query doesn’t display all posts
- Conflict between Capabilities and Menu Visibility with Custom Post Types
- Using menu_position to add two entries between Dashboard and Posts
- Change link for “add new” buttons on custom post type
- Reusable metabox backend and frontend
- Custom capabilities not reflecting on admin panel
- Top level menu position overwrites another entry
- How to limit what Editors see in the admin?
- Questions regarding add_meta_box()
- Change Post Meta via AJAX from the posts list table
- Custom Attachment Type
- Sorting custom post types in edit.php : Post disappear
- adding page types in menu
- Sort by post word count in admin area
- How to display magic field’s custom write panel in wordpress theme?
- Metaboxes inside Tab
- Admin slow on Postlist (over 30k Posts in Database)
- Hide title field of selected post-types on edit pages
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- Restrict admin pages for specific user role
- Cannot include custom post item within a menu
- Admin Post Table – Remove Title Edit Link
- remove duplicate name submenu link from the custom post type
- How do I create a customised table list of a custom post type (in the admin area)?
- Restrict Custom Post Type to One Item
- Subset of Custom Post Type From Admin Menu Based on Meta Data
- How to redirect from wp-admin/edit.php to a frontend page for specific custom post type?
- Simple Data picker meta box
- In the admin, how can you list thumbnails instead of titles for a custom post type?
- Custom post meta box as a sub form
- Add filter button to custom post type in admin area
- Show custom taxonomy not in submenu
- “Trash”, “Draft” and count not showing for custom post type in admin panel
- How to add elements to WordPress appearance->menu admin?
- How to avoid hardcoded text in a custom page template?
- Custom Post Type Causing Admin Sidebar UI Issue
- 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
- admin search of pages returns custom post types
- wordpress custom post type shows other cpt posts in admin menu
- Custom post types not showing in the admin menu on production, but shows locally
- Custom order of CPT posts by title, in wp-admin area by default
- Admin menu link with variable