post thumbnails - Add instructions to featured image

How do you add instructions to the featured image field (see attached screenshot) - something like: "recommended di

How do you add instructions to the featured image field (see attached screenshot) - something like: "recommended dimensions - H980px by W450px"..?

How do you add instructions to the featured image field (see attached screenshot) - something like: "recommended dimensions - H980px by W450px"..?

Share Improve this question asked Jul 6, 2020 at 11:20 jenojeno 486 bronze badges 2
  • Looks like this is possible but requires a bit of cide, are you able to edit your functions.php or setup a new plugin to do this? – mozboz Commented Jul 6, 2020 at 12:10
  • @mozboz yes, I can edit my functions.php file – jeno Commented Jul 6, 2020 at 13:28
Add a comment  | 

1 Answer 1

Reset to default 3

Wordpress has a hook for that. Here is a sample code:

function featured_image_dimensions( $content, $post_id, $thumbnail_id ){
    $help_text = '<p>' . __( 'recommended dimensions - H980px by W450px', 'my_domain' ) . '</p>';
    return $help_text . $content;
}
add_filter( 'admin_post_thumbnail_html', 'featured_image_dimensions', 10, 3 );

Add this code to your functions.php and you should be good to go.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742288749a4415800.html

相关推荐

  • post thumbnails - Add instructions to featured image

    How do you add instructions to the featured image field (see attached screenshot) - something like: "recommended di

    19小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信