Adding guiding text to the ‘Featured Image’-box in the backend

If you are using the Classic Editor of wordpress, there is a function for this:
https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/

So the code would be (example from link):

function filter_featured_image_admin_text( $content, $post_id, $thumbnail_id ){
    $help_text="<p>" . __( 'Please use an image that is 1170 pixels wide x 658
    pixels tall.', 'my_textdomain' ) . '</p>';
    return $help_text . $content;
}
add_filter( 'admin_post_thumbnail_html', 'filter_featured_image_admin_text', 10, 3 );

Remember to set the textdomain of your theme.


If you are using the Gutenberg editor, this is a litte more complex. The filter does not seem to work for gutenberg.
As it is made with React JS, I assume it is working differently. Maybe this link can help you:
https://github.com/WordPress/gutenberg/tree/master/packages/editor/src/components/post-featured-image#postfeaturedimage

Moreover I found something that can really help you:

https://thatdevgirl.com/blog/wordpress-featured-image-and-gutenberg

This tutorial can guide you how to adjust the featured image box with filters for gutenberg editor.

Hope this is a starting point for you, if you want to use Gutenberg.


You can also create a custom field of the type of image (Plugin -> Advanced Custom Fields) and use this for the image output in your template. This way you can style the box as you want, add description or whatever you like.

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduedueduseduedueduseduedusedu