Aleš Sýkora / June 20, 2022 / 0 comments
Add featured images support for Page post type in WordPress
1 min read / Custom Code, WordPress / Share on: Twitter, LinkedIn, Facebook
Post summary: If you want to use featured images with Pages in WordPress, you must add the support for them. You will do that with your custom code plugin, or code snippets plugin like advanced scripts.
If you want to use featured images with Pages in WordPress, you must add the support for them. You will do that with your custom code plugin, or code snippets plugin like advanced scripts.
/* Display Featured Image field for page post type */
function gt_post_feimage() {
add_theme_support( 'post-thumbnails' );
}
add_action( 'after_setup_theme', 'gt_post_feimage' );
Fuel my passion for writing with a beer🍺
Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻