Enable featured image in WordPress pages
In default, the featured image is only available for WordPress post.
But we can easily enable featured image for WordPress pages also. Just add below code snippet in to our theme’s / child theme’s functions.php
file.
add_action( 'init', 'add_featured_image_to_pages' );
function add_featured_image_to_pages() {
add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );
}
Recent Posts
- Automating Release Generation with GitHub Actions
- WP CLI Commands to Bulk Delete Entries in WordPress Database
- Split a Single CSV File into Multiple Files Using the Split Command - Bash
- Migrating code repo from BitBucket to GitHub
- Streamlining Development - Our Journey with Git, Bitbucket, and Jira
Your Questions / Comments
If you found this article interesting, found errors, or just want to discuss about it, please get in touch.