There are comments in core code that this should be improved, but they are there for a while already. Basically there is no native function to add or remove part of some feature, only feature altogether.
Doing it manually would be running something like this after theme is done (late on after_setup_theme
hook):
function add_thumbnails_for_cpt() {
global $_wp_theme_features;
if( empty($_wp_theme_features['post-thumbnails']) )
$_wp_theme_features['post-thumbnails'] = array( array('your-cpt') );
elseif( true === $_wp_theme_features['post-thumbnails'])
return;
elseif( is_array($_wp_theme_features['post-thumbnails'][0]) )
$_wp_theme_features['post-thumbnails'][0][] = 'your-cpt';
}
Related Posts:
- How to add multiple featured image in meta box in post editor?
- How to List Thumbnails based on Custom Categories
- How to add a default predefined thumbnail when creating a brand new post?
- Where to put my code: plugin or functions.php?
- Should I use custom post types or a custom database tables for plugin development?
- How come Featured Image isn’t showing up in my Custom Post Type?
- add_image_size() for specific Post Types
- Where, When, & How to Properly Flush Rewrite Rules Within the Scope of a Plugin?
- How do I change the author of a custom post type?
- How to disable generation of default image sizes for some custom post types?
- Custom Post Type Plugin: Where Do I Put The Template?
- Best way to flush_rewrite_rules for custom post type, in a mu-plugins plugin?
- How to Add Custom Taxonomy To Woocommerce Plugin
- Creating a Custom Post Type as a Plugin? Why?
- Custom user role cannot see or modify featured image
- Make featured image required
- Quick edit screen customization
- Mini-Site Strategy
- The Great Plugin Nomenclature Contest of 2011
- Prevent trash/delete action on specific post types
- How to remove “featured image” functionality from a custom post type?
- How to add custom content template part for a custom post type on main query using a plugin
- How to completely disable a taxonomy archive on the frontend?
- Featured Image Panel Missing From Custom Post Type in WordPress 3.2
- How do you create an archive for a custom post type from a plugin?
- How to add a button to custom post type’s posts-page
- set_post_thumbnail_size in percent, not pixels?
- Loading custom page template via plugin
- Why The Init Hook For Custom Post Types
- How to set a fall back template for a custom post type in a plugin?
- Best way to filter featured image text for a custom post type?
- How to add multiple images to custom post type?
- Creating a custom public user page
- wordpress plugin error handling
- How to get term link that crosses different custom post types?
- register_taxonomy with multiple object type and update_count_callback
- Redirect after deleting post and keep track of pagination
- How often do you need to register_post_type?
- get_edit_post_link() not working as expected when passed id in plugin
- If featured image doesn’t exist, show post content
- Where to put archive-{post-type}.php
- Render a different post/template from within the template_include action?
- Is flush_rewrite_rules necessary when creating a custom post type? Why?
- How to use a dedicated template for the Custom Post Type from a plugin?
- How do I Make a custom post type get a custom post template in a plugin
- set and unset the custom field value
- Determine which template-{slug}.php is being loaded
- How I upload, save and set a featured image from my frontend?
- How to append text to title of Custom Post Type post (without affecting all titles on page)?
- Remove Slug from Custom Post Type results in 404
- WordPress metabox file upload in custom post [duplicate]
- working Custom Post Type and Widget code no longer works when moved from functions.php to plugin
- WordPress custom post action hook
- Unable to filter on field on edit.php page
- Trouble adding custom featured image for custom taxonomy TERMS
- Multiple Permalinks for custom post type post
- On clicking on the category name the page is redirecting on 404 pge
- Insert slider (Custom Post Type) into pages
- How do I create a custom post type for a training CMS in WordPress?
- WP Query group/order by category name
- Save or update data when custom post published
- How can i place Feature Image under title field in wp-admin?
- Remove POST_TYPE from custom post type permalink
- Uploaded image not appearing in custom post type
- How to remove thumbnail sizes for specific post type on a child theme?
- Featured image metabox not showing up
- image srcset returns false
- Custom Taxonomy and tax_query Issue?
- How to use different featured image size for a custom post type?
- Use a textarea for a custom post type
- Using posts and postmeta table to store custom Address Book Plugin data
- How to register custom post types in a plugin?
- Actions that Run on Admin Edit Page Load After Posts Are Queried
- get_the_post_thumbnail() returning empty string on custom post type
- Change admin post thumbnail size for custom post type only
- Row actions not showing? Why?
- Make custom post type display as a page
- template_redirect not working, apparently for no reason
- How to: add option to add more checkboxes on custom post type
- Custom role capabilities to administrator not taking effect (no plugin)
- How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”
- How to add notification in the sidebar of the administration panel when a Custom post type is created? [duplicate]
- Hierarchical or Non-hierarchical Custom Post Type in Real World Example
- how to set default value for checkbox in wordpress
- How to append element after thumbnail
- How do I include drag-and-drop in a plugin?
- How could I create a ‘private comments’ section on a custom post type?
- Custom Post Type get_post_type_archive_link( $post_type ) returns false
- How do I set the link in the Custom Post Type admin menu?
- reference the current category being used in the category.php page
- add_image_size for post type
- Gutenberg Featured-Image-panel missing when user with custom role edits Custom Post Type
- Adding Meta Boxes while Registering a Post Type in a Class
- How to have the right design for a custom post type without accessing themes
- Dynamic Custom Post Type Plugin
- How to rename image at uploading on specific plugin or post-type in WordPress
- handling csv data with a custom post type
- How do I alter the position of a Custom Post Type menu item within my plugin admin menu?
- Customize permalink when creating a post
- Custom Taxonomy Not Showing in Menu