admin管理员组文章数量:1122846
I have a custom theme. I've deactivated every plugin. I can't get the Featured Image block on the right sidebar of editing a post to show up so that the user can set the featured image.
I have this in my functions.php file:
add_theme_support( 'post-thumbnails' );
Note that this worked fine before Wordpress 5 / Gutenberg update.
What am I missing?
I have a custom theme. I've deactivated every plugin. I can't get the Featured Image block on the right sidebar of editing a post to show up so that the user can set the featured image.
I have this in my functions.php file:
add_theme_support( 'post-thumbnails' );
Note that this worked fine before Wordpress 5 / Gutenberg update.
What am I missing?
Share Improve this question asked May 6, 2019 at 13:47 RailsTweeterRailsTweeter 2631 gold badge4 silver badges11 bronze badges 1- Note that when I use the Classic Editor, it also doesn't work. Same issue. – RailsTweeter Commented May 6, 2019 at 13:56
3 Answers
Reset to default 5The function with the add_theme_support( 'post-thumbnails' ); wasn't being called for some reason. Once I fixed that, everything works now.
I'm facing the same issue. I also can't see the thumbnail meta box in Gutenberg editor.
I tried different ways but unfortunately, still, the same issue exists.
In the below code, you can see I enable the post-thumbnails for post and page.
add_theme_support('post-thumbnails', array('post', 'page'));
When I found the above code was not working then I tried the below code
add_action('after_setup_theme', function () {
remove_theme_support('post-thumbnails');
add_theme_support('post-thumbnails', array('post', 'page', 'hero', 'event', 'video'));
});
But still, the same issue exists.
Note: If I disable the Gutenberg editor by using this code then I can see the thumbnail image meta box
add_filter('use_block_editor_for_post', '__return_false', 10);
Waiting for your help!
Thanks!
My issue was solved by Deactivating and then reactivating the theme. NOTE: I had all the relevant code already there with no issues (in terms of code) and i was still not able to get that Featured Image Metabox.
本文标签: Wordpress 5Gutenbergtheme doesn39t have featured image option showing up
版权声明:本文标题:Wordpress 5Gutenberg - theme doesn't have featured image option showing up 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736281068a1926197.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论