admin管理员组文章数量:1332389
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
1 Answer
Reset to default 3Wordpress 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.
本文标签: post thumbnailsAdd instructions to featured image
版权声明:本文标题:post thumbnails - Add instructions to featured image 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742288749a2447407.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论