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
- WP_Query search posts by custom post type and custom taxonomy
- Filter custom post type archive page with custom taxonomies (categories) with AJAX
- Dynamic Custom Post Type Plugin
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- I am having a problem with form updating/editing WordPress post on the frontend
- WP-Admin edit.php & post.php slowdown after import of 10k users
- Display custom field of specific post where post title matches variable
- Conditional to modify query results
- How to remove ‘create new post’ entry for a custom post type?
- How to make post sticky in the admin page?
- Loop through posts of a custom-post-type (event) and create .ics (iCal) file?
- How to customize admin posts based on the user who is logged in
- Output custom post shortcode. Help spot the error.
- How to count custom post types with conditional operators
- How to check if “is single” page
- WP_Query is printing out only one post when posts_per_page is set to multiple
- WP Query to displaying date and posts for that date?
- GravityForm: Populate Dropdown with custom post type [closed]
- Make a function to run only for CPTs
- Return array of categories to php function for current post
- Link users to a custom post type
- Create a random unique 6 digit number as custom field for custom post type
- How to output wordpress custom tags separated by comma?
- Get all of user’s custom post types in WP Admin for plugin
- Modifying date filter on admin page for custom post type to link to custom field
- Loading all files within a directory
- Add html to cpt main page / admin edit.php
- Blog page showing same content as homepage
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- register_taxonomy and register_post_type does not work [closed]
- Change headers in admin posts list
- Using several custom fields as custom post title
- Custom Post Type without an archive page
- Get rewrite slug of custom post type in template
- Show Different Header on a Specific Post ID
- Pre_get_posts filter overwrites all search functionality
- Get Post Primary Category
- Weird problem happening with custom taxonmy when creating/updating posts
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- Filter categories of posts with checkboxes
- Can’t get order_by meta_value_num to work properly
- Custom Post Type + 20k posts = blank/404 within Admin edit.php [duplicate]
- Create custom post type on successful woocommerce order [closed]
- Adding custom tables to WordPress
- WooCommerce product search titles only
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- How do increase the amount of links shown down the left in the admin menu?
- submenu item edit a specific post
- Remove rows in the manage post/page view
- Very Slow Page – How to Optimize # of Queries?
- Dynamic page outside WordPress
- How to detect filter in URL in Category page?
- Using wordpress template tags within an array
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Getting the URL of the parent page
- Custom post type permalink returns bad url
- Return the thumbnail meta data for getter and setter
- Why is conditionally loading a custom plugin’s code only on a specific custom post type causing the site content to disappear?
- 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
- How to display selected taxonomies by their parent
- Custom Field Order by Last Name and First Name
- Setting proper query for multiple custom admin filters
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- Pagination for custom php code
- get_posts of Custom Post Type AND Custom Taxonomy
- Unable to retrieve any posts of CPT in wp-admin
- What’s the difference between same wp functions get_posts(); functions in different form?
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- Display post meta on edit page in admin
- Custom Post Type Loop throws 500 error when used in widget
- how to check if custom post type column already exists?
- Get posts from a custom post type by child categories of a parent category