How to Add Text to Featured Image Meta Box

As a WordPress theme developer, one of the things I run into is clients using images that maybe too small to fit the theme. In some instances I will use Advanced Custom Fields to replace the featured image box. By applying a few rules I can make sure that images are always a size that will fit. For other scenarios this might be a bit of overkill.

After lots of searching I found this hidden gem in the WP filters, admin_post_thumbnail_html. This will allow you to hook in a function to append the text in the featured image meta box. Although it offers no actual validation, it can guide a client to insert an image that best fits the theme.

Here’s an example:

I hope this helps other developers out there get the best from their themes.