WordPress meta box title alterations

Nathan WrigleyWordPressLeave a Comment

Have you ever wanted to alter the name of a WordPress meta box label?

In this example I’m altering the name of the ‘Author’ meta box label so that it now reads ‘Vendor’.

I want this:

author meta box

to become this:

Vendor meta box

add_action('do_meta_boxes', 'rename_author_meta_box' );
 function rename_author_meta_box() {
 remove_meta_box( 'authordiv', 'house', 'side' );
 add_meta_box('authordiv', __('Vendor'), 'post_author_meta_box', 'house', 'normal', 'high');
 }

To explain:

authordiv – is the WordPress name for the default Author meta box
house – this is the name of the Post type that this is going to apply to. So this could be ‘post’ or whatever post type slug you’re using.
Vendor – this is the new title that my Author box is going to receive.

The rest is just the function and action needed to perform the alteration.

You can find out more here and here.