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
- Change the text on the Publish button
- Row actions for custom post types?
- Loading External Scripts in Admin but ONLY for a Specific Post Type?
- Register CPTs using Dashicons for admin menu icon in WP 3.8
- How can I remove the “Add New” button in my custom post type?
- Custom Post Type Settings page, choose page to display archive
- Put update-like notification bubble on multiple CPTs menus for pending items
- Meta Boxes: ‘admin_init’ or ‘add_meta_boxes’ hook?
- Show Custom Taxonomy Inside Custom Menu
- Add content in custom post type page after the title and before columns
- Change the edit page for a custom post type?
- How to check if I’m on a custom post type archive in the admin area
- Admin Filter – Add Post Type Description on Post Type Page
- how to group custom post types
- How do I filter the excerpt metabox description in admin?
- Can I have Post Types under other Post Types in Admin menu?
- How to add custom columns to Custom Post Type admin screen
- Hide/Show only specific categories in wp-admin new-post.php
- Best way to filter featured image text for a custom post type?
- WordPress Custom Post Type Admin Page really slow
- Add content before/after admin post wp-list-table
- Custom post type Admin Page
- Post slug changed using code doesn’t reflect on editor when post is published
- How Do I Programmatically Better Organize Custom Post Type Menus?
- Add Post type menu to another menu
- Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?
- WP Admin default view mode for Custom Post Type
- 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?
- Remove date and category filters when editing custom post types
- Ordering Post 2 Post admin meta box by meta from CPT
- Menu position (admin menu) of pages
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- how to create my own edit.php admin page code or template for my custom post type
- How to remove/hide elements from the admin menu?
- Displaying Post Title on Post Edit page?
- Remove Custom Post Type menu for non-administrator users.
- Backend search; include CPT meta?
- How to programatically set the post title of a CPT on wp-admin
- 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]
- Make a custom column sortable, by custom post count
- Sort custom post types by last name in the backend
- 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
- Custom Post Type and taxonomies’s labels localization not working
- how to only have one custom post type post?
- Restrict categories to a custom post type
- Changing the header on post listing page in admin area
- How can I use a different default admin menu icon for custom post type?
- How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”
- WordPress User Roles, Custom Post Types, and Admin views
- Add text to post list/edit screens?
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- Adding menu_order to CPT admin page
- Remove “Get Shortlink” button in admin of custom post type
- How to add new tab to admin list of posts and handle result list
- Need functionality with all post list available at edit.php
- Displaying different custom post types under one admin menu
- Show hierarchical relationship between to custom post types on admin list
- Show Custom Post Type values in WordPress grid view
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- WP-Admin edit.php & post.php slowdown after import of 10k users
- Add management screens to post type
- 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 make post sticky in the admin page?
- How to customize admin posts based on the user who is logged in
- How to add custom post type under option page
- How to remove default tag and category options form a custom post type admin menu
- Get all of user’s custom post types in WP Admin for plugin
- 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
- Change headers in admin posts list
- rewrite custom post type slug in wp admin
- Admin notice not displaying
- Custom Post Type + 20k posts = blank/404 within Admin edit.php [duplicate]
- submenu item edit a specific post
- Remove rows in the manage post/page view
- Admin not showing all custom post type posts and views not working
- How to avoid manage posts screen duplicates when two plugins use the same library
- Move custom post menu to under plugin admin menu
- Unable to retrieve any posts of CPT in wp-admin
- Display post meta on edit page in admin
- Insert & order custom post types in/as submenu
- Modify action buttons for custom post type
- With two custom post types, how to make one a child of the other in the admin menu?
- Admin Pointers on a custom post type
- Add a button or image button that calls wp functions in the wp-admin
- Selecting a post in Dashboard