A nearly identical use case for your question is found in the WordPress documentation for the filter admin_post_thumbnail_html
.
A filter hooked to this will receive the HTML for the admin screen as $content
. Modify and return this markup as you wish.
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_domain' ) . '</p>';
return $help_text . $content;
}
add_filter( 'admin_post_thumbnail_html', 'filter_featured_image_admin_text', 10, 3 );
Full details here:
https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/
Related Posts:
- Missing feature image link function
- Automatically set the featured image
- Get recent posts with thumbnail
- How to display the_post_thumbnail if a post has one or otherwise display the first image in a post?
- Add options to featured image
- Linking thumbnail to full size image
- Generating Responsive Background Image Sizes in PHP
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Add a Post Thumbnail to an RSS Feed with custom size
- Make WordPress size and name images for Retina.js
- Why are image thumbnails cropped proportionally (not per dimensions)?
- the_post_thumbnail fallback using hooks
- Display height and width properties with the_post_thumbnail() or related function
- Setting featured image with function, 1 part not working
- Removing the first image in content
- How to set the jpg image compression for specific thumbnail sizes?
- Function to auto-set a featured image that is already in use
- img width and height attributes being set by get_the_post_thumbnail
- Get the 5 lastest Featured Posts from a category
- How to display a default image for post thumbnail using functions.php?
- Change size and crop medium_large images
- Getting Featured Image Caption to Only Show if Populated
- wp_get_attachment_image function size argument not working if I also add a custom class
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Add Featured image column into wordpress admin on pages AND posts
- Post thumbnail not showing in WP admin area for custom post type
- Overwriting Parent Theme’s Image Sizes
- Backstretch.js and thumbnail sizes to reduce loading time
- set_post_thumbnail when user is not logged in
- How to stop twenty fifteen theme from cropping featured images?
- Can you put a condition on add_image_size() depending on the width of the uploaded image?
- show first 3 thumbnails of posts in different sizes [closed]
- Set spesific size of featured images
- Can’t generate thumbnail images
- It does not work concatenation in function.php
- How to retrieve the current post’s generated featured image size?
- Check if the image size is available and if not use ‘full’ image size
- is there a way to remove featured image from blog page and single page
- How to hide image-url if no attachment?
- Can set_post_thumbnail be used to remove a thumbnail?
- Can’t locate custom image sizes defined by child theme
- How to add a new image size and apply it to posts only?
- Show Featured Image in else statement
- Change custom featured image size in twentythirteen child theme
- resizing of thumbnails not working
- Featured Image keeps cropping
- show all the posts thumbnails
- struggling with syntax for the_post_thumbnail();
- include w_thumbnail_src in function?
- Custom image sizes showing in Classic Editor only when upladed directly to post
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- remove_filter function to unhook twentysixteen parent theme function
- Can You Set A Minimum Image Dimension For Resizing Images?
- Featured image on archive page based on post type
- Printing medium sized image
- Sticky – Featured Image
- Frontend Feature image upload not work
- Best way to add image to recent posts widget?
- Slider Thumbnail Size Issue [closed]
- Remove Featured Images from Posts Older Than a Certain Date
- Apply height and width for the_content() inside youtube video tag
- Set thumbnail from URL, by grabbing image in functions.php
- add_theme_support not outputting thumbnails
- Full size image option removing problem
- Image width issue in IE [closed]
- image_size with respect to aspect ratios
- Is mytheme_post_thumbnails() still necessary?
- Which WP functions do you need to use esc_html() or esc_url() on?
- Enqueue Script with data attributes
- delete uploaded file
- Unregister Nav Menu with fallback?
- Insert width & height attributes to all images displayed on each page
- Remove default user registration, login and subscriber profiles
- How to load some jquery code to make validation in the theme customizer?
- Hook specific functions if on a specific admin page
- How do I customize my wordpress Admin Area?
- User meta and author meta
- Sorting table function default
- Custom Nav Walker sub-menu
- How do I remove the date and category form my portfolio pages
- Get list of all custom tanonomy id
- Modify post filter to set custom number of posts per page and exclude child posts
- Changing parent element’s class or style
- User function to return multiple get_post_meta()
- How can I pass a shortcode value to the head in wordpress functions.php
- Native gallery custom html output
- WordPress wraps span tags into p tags
- Auto scroll to id on page load on all pages except home page. Only do this on mobile
- How to add schema markup to WordPress menu function
- contact form in template with jquery,validate and ajax
- How to require a config file in a template and in function.php?
- Allow user select role in wordpress default registration without plugin
- Display link to category over featured image
- Re-style Login Form Whilst Keeping CSS Separate from Frontend CSS
- How to add custom column into custom post, when field is select
- Function image_send_to_editor returns emty title tag
- Show latest custom post types on dashboard
- Using conditionals, maybe from a DB, to register & enqueue files, for varying pages, in functions.php
- Adding a filter to my posts
- Directing to functions.php the correct way