Worked for me,
add_action( 'after_setup_theme', 'headless_theme_setup' );
function headless_theme_setup() {
add_theme_support( 'post-thumbnails', array( 'post' ) );
}
WordPress version 5.0.2
Related Posts:
- The the_post_thumbnail without srcset?
- Get the first image from post content (eg.: hotlinked images)
- How to add a 2nd “featured image” to a post?
- How to change post thumbnail title and alt attributes to post title?
- Unexpected width and srcset attributes for the_post_thumbnail();
- How to handle thumbnails
- Change display of featured image for pages in twenty seventeen theme
- How to set dimensions of the post thumbnails (featured images)
- How to regenerate thumbnails when they’re stored on S3
- Cannot get full thumbnail size using the_post_thumbnail
- Can’t show custom post thumbnail sizes as background images
- Featured Images are not able to be set
- Display recent posts with thumbnail
- Reasons why all thumbnail sizes aren’t working
- How do I Add images uploaded in the post to a default custom field
- How do I build a post_thumbnail based archive? [closed]
- How do I turn a post thumbnail into a background image?
- Reactor Theme: Prevent Post Thumb on Post
- Featured Image meta box not showing up
- How do I remove inline style in featured image markup?
- Set a featured image as a replacement to the header image
- Dynamic Post Thumbnail →
- Issue on Getting Custom post type Thumbnail’s URL
- How To Pick Custom Size Of Uploaded Image In Theme Via the_post_thumbnail();?
- How to disable thumbnail filter for a specific template part or image size?
- the_post_thumbnail() get the URL to the “medium” sized image
- Full width featured thumbnail
- How can I get the featured image or the first image for a post/page and display it as a banner?
- How to make excerpt image be full size instead of thumbnail?
- How can I scale down the width of images in bulk that are embedded in posts throughout the site?
- Add image URL automatically to custom field?
- theme directory fallback image outputs url and not the image
- Full width thumbnail
- Featured Image Module Randomly Disappears
- Single Featured Image Repeating
- Any disadvandages if I style the wordpress align classes without img and .wp-caption prefix
- apply_filters to featured image
- Show post thumbnail only if it exists using timthumb
- Display Page featured Image as well as Posts featured Image
- How do I work with responsive images in WordPress? (img srcset/sizes)
- I want to resize post featured image without cropping image. How?
- What is the difference between front-page.php and home.php? [duplicate]
- Strict Standards Error bootstrap navwalker
- Specify image dimensions
- Adding Action Hooks In Parent Theme For Easier Child Theme Customization
- register_sidebar ignores ‘id’ and ‘class’
- Add colors to existing color palette without replacing it
- Add link option to featured image?
- How to hide and content from auto-generated excerpts?
- Default header image does not display
- A guide or tool for inserting bootstrap in underscores theme? [closed]
- What is the right way to make custom main page?
- .sub-menu or .children?
- Custom CSS without css.php file
- Understanding WordPress(framework?) Web Development
- For best DB performance should I serialize all theme options together or by type?
- How to control layout of posts on page?
- saving row as a template using WPBakery Page Builder is not working [closed]
- Non-Blog Website without Search: are comments.php and search.php in theme still required?
- Admin Notices don’t display on the admin screen for certain post
- Custom metabox for custom page template
- Custom Widget options in theme
- Include Parent functions.php in Child Theme functions.php
- Primary navigation menu & footer not showing in category / tag page
- wp_script_add_data doesn’t seem to work
- Exclude read more in the_excerpt [closed]
- Where am I doing wrong in my theme menu?
- Calculate data and passing to Theme
- Updating a live theme safely?
- Change Responsive Images Maximum Width of 1600px
- Why is my CSS not loading?
- How to find default functions of wordpress
- How to remove ver from stylesheet URL? [duplicate]
- How can I hard code my sidebar?
- wp_nav_menu with default pages menu
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- using Options Framework – can “theme-textdomain” domain be changed?
- How to add sidebar to Isola theme? [closed]
- Filter to remove the default password on “Your Profile” page
- How to add testimonials with an image?
- How to setup sidebar modules to use jQuery Accordian
- Theme functions don’t work as expected in partial included via get_template_part() after custom query using Ajax [duplicate]
- How can I not disable my theme when I want to upload a new version of it?
- WordPress Menu item > Sub menu Class update
- How to know and change the machine name of a menu?
- Images use & location, on new wordpress theme
- On wordpress, how do i require specific dimensions from user uploads only
- how to create export / import theme options in wordpress without plugin
- Slider should be display in home template [closed]
- WordPress Customization API overwrite LESS variable
- Dynamic meta description
- How to Remove Sidebar when get_sidebar() is not get called in page?
- Plugin or script to apply updated media settings to all featured images
- Header links also appearing in the footer
- Extending arrays in parent theme without completely overriding the files
- WordPress Subpages Fancybox Trouble
- Toolbox theme using printif statement – help needed understanding code block
- WordPress does not know the parametrs i sent to admin post
- Custom Single Page Portfolio Theme [closed]
- Not Able to Access Terms Under Custom Taxonomy Archive