• Resolved mirko.menegazzo

    (@mirkomenegazzo)


    I would like to call the “Featured Image” box with another name (‘Video Thumbnail’) and move it from ‘side’ to ‘normal’.

    It is a piece of cake if I replace this line in edit-form-advanced.php

    add_meta_box('postimagediv', __('Featured Image'),'post_thumbnail_meta_box', $post_type, 'side', 'low');

    with

    add_meta_box('postimagediv', __('Video Thumbnail'), 'post_thumbnail_meta_box', $post_type, 'normal', 'low');

    I do not want to touch the core files though, I want do do it via the functions.php in my child theme. I am also using it only for my custom post types.

    Any suggestion???

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mirko.menegazzo

    (@mirkomenegazzo)

    I figured it out!

    My post type is called ‘au-portfolio’, then I used this in my function.php:

    function customposttype_image_box() {
    
    	remove_meta_box('postimagediv', 'au-portfolio', 'side');
    
    	add_meta_box('postimagediv', __('Video Thumbnail - 100 X 60 pixels - Bigger images will be cropped automatically.'), 'post_thumbnail_meta_box', 'au-portfolio', 'normal', 'low');
    
    }

    Presto!

    Hey Mirko,

    Tried using this–where/how are you calling the customposttype_image_box() function. When I try to call it, my page admin section breaks. Am I missing something?

    -Brent

    Thread Starter mirko.menegazzo

    (@mirkomenegazzo)

    This is the full code, in my functions.php

    //Use "Featured Image" box as a custom box
    function customposttype_image_box() {
    
    	remove_meta_box('postimagediv', 'au-portfolio', 'side');
    	remove_meta_box('postimagediv', 'au-gallery', 'side');
    
    	add_meta_box('galleryimagediv', __('Full Size Image. Ratio 4:3, minimum size 800 x 600 pixels.'), 'post_thumbnail_meta_box', 'au-gallery', 'normal', 'low');
    	add_meta_box('postimagediv', __('Video Thumbnail - 100 X 60 pixels - Bigger images will be cropped automatically.'), 'post_thumbnail_meta_box', 'au-portfolio', 'normal', 'low');
    
    }
    add_action('do_meta_boxes', 'customposttype_image_box');
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Move and rename "Featured Image" box’ is closed to new replies.