Featured image is not displaying on wp-admin side. I have also selected 'featured image' option from Screen Options. While Selecting image from media it doesn't show selected image in the metabox. I have written the below code:
function twentytwelve_setup() {
add_theme_support('post-thumbnails');
}
add_action( 'after_setup_theme', 'twentytwelve_setup' );
Featured image is not displaying on wp-admin side. I have also selected 'featured image' option from Screen Options. While Selecting image from media it doesn't show selected image in the metabox. I have written the below code:
function twentytwelve_setup() {
add_theme_support('post-thumbnails');
}
add_action( 'after_setup_theme', 'twentytwelve_setup' );
Share
Improve this question
edited Sep 19, 2016 at 11:59
cjbj
15k16 gold badges42 silver badges89 bronze badges
asked Sep 19, 2016 at 11:57
Nehal ShahNehal Shah
312 silver badges3 bronze badges
2
- 1 That code looks fine. The behaviour is unusual and it's difficult to say what may be causing it. The usual debugging path would be to disable all plugins and see if the problem is still there. Then switch them on one by one. – cjbj Commented Sep 19, 2016 at 12:01
- why do you have this inside a function? Can't you just put add_theme_support( 'post-thumbnails' ); directly inside your functions.php? – RiddleMeThis Commented Sep 17, 2018 at 15:35
2 Answers
Reset to default 2Have you double checked if the featured-image section is enabled under the Screen Options
tab?
You can disable/comment these plugin/code one by one by which having remove_meta_box() function.
remove_meta_box
function is used to removes a meta box or any other element from a particular post edit screen of a given post type. It can be also used to remove a widget from the dashboard screen.
Once you filter this things you get the cause point. Best of luck!