Please refer below :
function disable_new_posts() {
// Hide sidebar link
global $submenu;
unset($submenu['edit.php?post_type=CUSTOM_POST_TYPE'][10]);
// Hide link on listing page
if (isset($_GET['post_type']) && $_GET['post_type'] == 'CUSTOM_POST_TYPE') {
echo '<style type="text/css">
#favorite-actions, .add-new-h2, .tablenav { display:none; }
</style>';
}
}
add_action('admin_menu', 'disable_new_posts');
Related Posts:
- Row actions for custom post types?
- How do I filter the excerpt metabox description in admin?
- Best way to filter featured image text for a custom post type?
- WP Admin default view mode for Custom Post Type
- Remove date and category filters when editing custom post types
- Ajax filter with custom taxonomies
- Filter posts with ajax form and checkboxes
- Remove “Get Shortlink” button in admin of custom post type
- How to filter out post type meta?
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- Admin notice not displaying
- Custom query to filter posts that have current post as a taxonomy [closed]
- Filter term taxonomy metabox in custom post type
- creat filter with wp_query
- Filter hierarchical custom post type admin page by parent, and include children & grandchildren
- Custom post type editor with dynamic selects, one drop down populating a second second drop down not working
- search suggest – filter post type
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- How do I add custom HTML to the content of an archive page’s posts?
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- Sort custom post column by generated value?
- Dynamic page for nav items used as filters
- Add filter button to custom post type in admin area
- Exclude Custom Post Type from shared Custom Taxonomy
- using ACF datepicker to filter posts on a page
- How do I filter a custom post type loop by a field?
- Change CPT Edit Target Link for Admin List
- Remove “posts” from admin but show a custom post
- How to check if I’m on a custom post type archive in the admin area
- Add content before/after admin post wp-list-table
- Most efficient way to search for values from CPT in Post content
- Include images from pages in wp search.php results in default wp search
- List events by month
- Backend search; include CPT meta?
- Image size filtering in Media uploader according to custom post type
- Sort custom post types by last name in the backend
- Adding a span when custom post type is updated
- Hooking into wp_export filter for custom post type [closed]
- Custom Post Row Actions
- Add text to post list/edit screens?
- Output custom post shortcode. Help spot the error.
- Blog page showing same content as homepage
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- How do increase the amount of links shown down the left in the admin menu?
- Very Slow Page – How to Optimize # of Queries?
- How to display selected taxonomies by their parent
- Custom Field Order by Last Name and First Name
- Push metadata in array
- Get custom post type list for every category shortcode
- Displaying custom taxonomy in the admin list of a custom post type
- How can I run this code once so that my generated post title doesn’t keep changing on publish/update?
- Custom Post List View: Page or something else?
- WordPress custom post type split into pages
- Assign External Database Queries to Global Variables and Make Them Accessible
- Loop filtering Custom Post Types and/or Categories
- How to order posts of a custom post type by date DESC in dashboard Admin?
- Is there any way to get list of all possible filter hooks for all post types?
- Can I display custom post types in home.php or need page template?
- wp_insert_post wrong post type [closed]
- Hide Status Option From WordPress Publish Metabox and Rename Published on:
- Get data from PHP to JavaScript to set position of each post on front page
- Custom posts of one type have disappeared from admin. Still appear on site [closed]
- Query custom post types & Taxonomies and list them in a table on a page
- Creating a “glossary” of WordPress posts of a specific post type
- How do I show a link or ‘Read More’ button on a custom field excerpt when it is less than the word limit
- Nested Custom Taxonomies | Incorrect posts when querying
- How to filter url on post submission?
- Validate Custom Post Type fields
- How do I get the index for a custom post?
- Commas not displaying in implode
- add custom tags for custom post type in wordpress
- Modify a plugin function output from another plugin
- Custom Taxonomy Filter Issues
- Filter search posts by post meta?
- Modifying search results based on post_type
- Is it a connection or relationship between 2 custom post types?
- Change Text in Admin Panel
- redirect after submiting post for review
- How can I put content before my custom post type default pages?
- Custom front-end form for adding post – Category problem
- get_posts() returns empty on custom post type /wp-admin/edit.php
- How we can create menu from Appearance > Menu and use as a add-submenu-page for admin menu?
- Store a value in global scope after init hook is fired
- Get meta values from parent post and save in child post
- Help Adding filter to Add Media button for custom post type
- Duplicate posts in my custom loop
- How to override post-new.php with custom template
- get_post_meta for Custom Post Type ( CPT )
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- Meta box not saving
- Creating adminable dynamic filtering on custom post type
- Featured image in custom post is being disabled
- add current-menu-item to multiple custom post types
- Filtering in admin broken for custom post type in 3.8.1?
- Custom Post-type not returning the right child_of
- WordPress Set A Static Page/Template For All Sub-Pages
- Add HTML before a specific div?
- How to hide home title on pages and posts?
- Is there any way of not using my_init_method in the following code (that creates a custom post type)?
- Display ONLY ONE $term (Out of 4 terms) from a Custom Taxonomy and CPT