Change Metabox Title

Anyone know of a way to change the title of the core WordPress metaboxes on a post edit screen? I’m trying to alter the title of the “Featured Image” metabox and have found a way to edit the contents (via *admin_post_thumbnail_html*) but not the title itself.

Related posts

Leave a Reply

3 comments

  1. The “Right way” to do this is hooking to the ‘add_meta_boxes’ action, like so:

    add_action('add_meta_boxes', 'my_metabox_titles', 10, 2);
    function my_metabox_titles($post_type, $post) {
        global $wp_meta_boxes; // array of defined metaboxes
        // cycle through the array, change the titles you want
    }
    
  2. you can change it by filtered words like it :

    <?php 
    
    add_filter('gettext', 'mw_translate_words_array');
    
    add_filter('ngettext', 'mw_translate_words_array');
    
    function mw_translate_words_array( $translated ) {
    $words = array(
     'old name' = > 'new name'  ,
    );
    
    $translated = str_ireplace(  array_keys($words),  $words,  $translated );
    return $translated;
    }
    ?>