Search code examples
wordpresscustom-post-typeposts

How to change custom post type featured image metabox title and text labels?


I registered a custom post type name of Banks.

Could i change this post types post-thumbnails meta box title and text value ?

Is that possible ?


Solution

  • I just found the sulotion.

    Here is an example.

    add_action( 'admin_head', 'remove_my_meta_boxen' );
    function remove_my_meta_boxen() {
        remove_meta_box( 'postimagediv', 'banks', 'side' );
        add_meta_box('postimagediv', __('Add a bank image'), 'post_thumbnail_meta_box', 'banks', 'side', 'high');
    }
    

    Happy coding.