6

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?

1
  • Note that when I use the Classic Editor, it also doesn't work. Same issue. May 6, 2019 at 13:56

2 Answers 2

4

The function with the add_theme_support( 'post-thumbnails' ); wasn't being called for some reason. Once I fixed that, everything works now.

0

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.