Created
September 19, 2017 18:38
-
-
Save alexwcoleman/40b6741c5f97fc16ffef0aa523286b88 to your computer and use it in GitHub Desktop.
Add description to Featured Image Metabox in WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HTML is whatever you like | |
function awc_post_thumbnail_add_description( $content, $post_id ){ | |
$post = get_post( $post_id ); | |
$post_type = $post->post_type; | |
if ( $post_type = 'post') { | |
$content .= "<div style='background-color: #eee;padding: 1rem;'> | |
<h3><label for=\"html\"><strong>Best size: <br>900px wide by 600px tall</strong></label></h3> | |
</div>"; | |
return $content; | |
return $post_id; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment