You can add this line to your functions.php file to add the post thumbnail option to all post types:
add_theme_support( 'post-thumbnails' );
If you want it for only one post type, you pass an array of post type names as second argument:
add_theme_support( 'post-thumbnails', array( 'post' ) ); #shown in posts only
To display the thumbnail in your template files:
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
Read about Post Thumbails and add_theme_support().
Related Posts:
- Link to specific Customizer section
- How can I get the title attribute from get_the_post_thumbnail()?
- Set Featured Image for Archive templates
- A minimalistic admin theme for a WP 3 install
- How get Themes list via REST api?
- How do you get thumbnails to show up in the admin edit post?
- 100% width Featured Image Size
- Creating a theme options page
- Featured images, am I missing something?
- Functions containing parameter ‘yourtheme’
- Recommended Media Size for Twenty Fourteen
- get_the_post_thumbnail() produces different HTML on same arguments
- WordPress activate theme error $pagenow
- Migrating a website using custom image tags to use featured images instead
- Using DePo Masthead with WP 3+
- Why does an ad page open when I browse my websites’s wp-admin page?
- Theme seems to be preventing me from adding a new page to my site
- Does anyone know where to find the area to edit this text
- How to change WordPress theme outside of admin? Can’t access dashboard
- How do I get the featured image to sit below the header in the twenty nineteen theme?
- Default and warning messages & no login
- Edit box-header on WordPress Dashboard
- WordPress theme is not displayed properly on other computers
- Featured images are cropped on index and post page
- Change theme’s thumbnail to cropped WP featured image
- Theme stops media uploader from working
- Featured image on page is not displayed with certain theme: how to debug this?
- W3 Total Cache, CDN and theme files [closed]
- Dynamic template serving, change theme_root using add_filter from current theme
- is_front_page only works in theme file, and does not work in functions.php
- How do I change Twenty Nineteen’s primary color without using the color slider in the theme customizer?
- How to add the main style.css to my index.php?
- How to attach region identifier to a pretty url?
- Remove action within a class in a parent theme from the child theme
- How to get themes from wordpress.com per SVN? [closed]
- Edit raw HTML of the landing page
- Can I apply a WP theme to a specific custom page template?
- How to move WordPress theme files into a subfolder without breaking the theme?
- remove rel=next on home page but not others
- Disable Sidebar in the Product Page in Storefront Theme [closed]
- How do you create a custom WPTouch theme?
- Renaming the Twenty Fourteen WordPress theme
- Defining different theme for Blog posts page
- Working with an Array inside Your Theme Options Array – Multiple Values
- WordPress Theme for Video Showcase [closed]
- How to understand a specific bit of WordPress syntax
- How to unset comment_notes_before field in WordPress comment_form
- How to loop over wp_get_themes() and create an array of themes name
- Custom options below pages/posts editor?
- Fatal error with a theme
- WordPress theme options and insert default value for serialize data
- Switching to a child theme
- Restrict access to specific widget field based on user role
- Twenty Twelve theme search returns Nothing Found
- Files empty after moving with FTP
- GPL 2 Theme using a framework for commercial Theme?
- How to use one theme for multiple WordPress sites?
- Is wordpress big enough for my project [closed]
- Is there a way to upgrade a theme without losing custom templates?
- What hook is the currently active theme’s functions.php file loaded on? [duplicate]
- How to get theme screenshot
- Theme doesn’t support shortcodes
- It’s okay if I do not write add_action()
- Need to edit themes HTML code
- i would like to have 3 default columns editable in guttenberg
- Set a featured image as a replacement to the header image
- Define theme information other than through style.css
- Change avatar on themed profile page
- Trying to uninstall a theme, but it’s hijacking my home page
- Newbie wordpress question re banner height
- WordPress 5.1 upgrade has lost the parent theme JavaScript
- How to add custom JS file in WordPress Child theme with get_theme_file_uri
- Adding the jQuery to my theme that already exists in WordPress?
- Interpretation and explanation of register sidebar
- Removing the references to the wp-content folder
- Is it possible to open a page with a different theme?
- How to add some php code in header.php using plugin
- WordPress Theme and Plugin Name extraction
- Theme update deleted my custom page
- Create page options for theme?
- Homepage showing a simple listing of title, featured image, then posted on
- Permissions error
- Where is the best place to catch useragent?
- Knowing blog name using blog id
- Alternative to Back End Dashboard?
- How can I change the prev / next buttons text to Dutch?
- Woocommerce single product image blurred and small. Actual image is big
- Adding a template in WPTouch
- Get data from Theme Options and use them into meta options field in custom post type
- Cannot update a file for my theme
- one page wordpress theme
- How to remove the tripadvisor logo from the wordpress theme?
- Are the Theme frame works or Theme builders slow downs the performance? [closed]
- Do all themes accommodate all features?
- How to reduce Header at the top of the page
- Custom fields not displaying on front end
- Make the “Add New Post” one column for all users
- What happened to my Inactive Widgets?
- remove theme’s name from dashboard .. How?
- WP Nanoplex 1.0.3 malfunction