Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 22

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 28

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/gravityforms/includes/assets/class-gf-asset-processor.php on line 59
Move the Featured Image Meta Box for a Custom Post Type | Pixie Nerd Theme
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/wordpress-seo/src/generators/schema-generator.php on line 185
Go to the top

Move the Featured Image Meta Box for a Custom Post Type

I recently had a client who needed some customizations to how the WordPress admin area displayed the input areas. One of these necessary requirements was to have the Featured Image meta box moved to the top of the page, first thing after content entry. It’s some very simple code to add in your functions.php file of your child theme.

//Move Featured Image box //
add_action('do_meta_boxes', 'custom_post_type_image_metabox' );
function custom_post_type_image_metabox() {
	remove_meta_box( 'postimagediv', 'custom_post_type', 'side' );
	add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', 'custom_post_type', 'side', 'high');
}

Note that where it says “custom_post_type” you need to replace those words with your custom post type.

Was this useful to you? Do you have another way of doing it? I would love to hear about it.