Skip to content

Instantly share code, notes, and snippets.

@alexwcoleman
Created September 19, 2017 18:38
Show Gist options
  • Save alexwcoleman/40b6741c5f97fc16ffef0aa523286b88 to your computer and use it in GitHub Desktop.
Save alexwcoleman/40b6741c5f97fc16ffef0aa523286b88 to your computer and use it in GitHub Desktop.
Add description to Featured Image Metabox in WordPress
// 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