Enable the thumbnail meta box in the attachment edit screen

The following code enables the thumbnail meta box (featured image in backend) in Attachment edit screen.

function add_thumbnail_support_for_attachments() {
	add_post_type_support( 'attachment', 'thumbnail' );

add_image_size( 'attachment', 150, 150, true );
}
add_action( 'init', 'add_thumbnail_support_for_attachments' );

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

© 2020 Jakob Helmer - Powered by WordPress - @trails&tribulations