• How can I move the default Featured Image Meta Box position from the right column to the big left column, by using a php script or existing plugin. It should be moved right under the title for all Post Types including custom post types, not only for a specific Post Type?

    This is the code snippet I found:

    /* Move Featured Image Below Title */
    function move_featured_image_box() {
    remove_meta_box( ‘postimagediv’, ‘post_type’, ‘side’ );
    add_meta_box(
    ‘postimagediv’, __(‘Featured Image’),
    ‘post_thumbnail_meta_box’, ‘post_type’, ‘normal’, ‘high’);
    }
    add_action(‘do_meta_boxes’, ‘move_featured_image_box’);

    The problem here is the ‘post_type’ … as far as I understand this it has to be specified. But I would love to apply it to ALL post types.

    thanks!

    • This topic was modified 3 years, 7 months ago by sakowporg.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The post type arg is actually a screen ID named as the post type. You can get all post types with get_post_types(). Use that to construct an array of Screen IDs, which the meta box functions will accept for their $screen arg.

    This will work under the classic editor. The block editor doesn’t support draggable meta boxes, so I’m not sure you can move its meta boxes around like this. It’s worth giving it a try anyway.

Viewing 1 replies (of 1 total)
  • The topic ‘Move Featured Image Meta Box to the left column’ is closed to new replies.