How to Change the Titles of Your WordPress Category and Tag Meta Boxes


We all know what the category and tag meta boxes look like on the write/edit page in WordPress.

But as many of us look to use WordPress as a general content management system (CMS) and not just a blogging tool, it may help to change the labels on certain things, especially if you are building for clients or site users who don’t even realize they’re using a “blogging” platform.

In this example, I’m going to change the name of my Categories meta box to “Country,” and I’m going to change the name of my Tags meta box to “City.”

In my functions.php file (Appearance > Editor > Theme Functions – functions.php), I’ve placed the following code:

add_action( 'add_meta_boxes', 'change_tag_meta_box', 0 );
function change_tag_meta_box() {
global $wp_meta_boxes;
unset( $wp_meta_boxes['post']['side']['core']['tagsdiv-post_tag'] );
add_meta_box('tagsdiv-post_tag',
__('City'),
'post_tags_meta_box',
'post',
'side',
'low');
}

add_action( 'add_meta_boxes', 'change_cat_meta_box', 0 );
function change_cat_meta_box() {
global $wp_meta_boxes;
unset( $wp_meta_boxes['post']['side']['core']['categorydiv'] );
add_meta_box('categorydiv',
__('Country'),
'post_categories_meta_box',
'post',
'side',
'low');
}

 

And here’s the result.

If you would like to change your own Categories and Tags meta boxes, then you can use the code above and simply replace “City” and “Country” with whatever names you’d like.

 

Featured Plugin - WordPress Ecommerce Shopping Cart Plugin

Out of all the WordPress ecommerce plugins available, MarketPress has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

 

Change Other Meta Boxes

If you would like to change other meta boxes, then we’ll go through the code so you can figure out what you’d like to change for yourself. We will  change the Excerpts meta box in this example to read “Post Description.”

Let’s take a look at the “tags” portion of the code from above. The different highlighted sections are what you will need to change.

 

add_action( 'add_meta_boxes', 'change_tag_meta_box', 0 );
function change_tag_meta_box() {
global $wp_meta_boxes;
unset( $wp_meta_boxes['post']['side']['core']['tagsdiv-post_tag'] );
add_meta_box('tagsdiv-post_tag',
__('City'),
'post_tags_meta_box',
'post',
'side',
'low');
}

 

 

There are six different pieces of text you will need to change in the code above to change a new meta box.

The first in the example above is

'change_tag_meta_box'

This is a unique name that you make yourself. We’ll change ours to be about the excerpt:

'change_excerpt_meta_box'

You will need to put this in two places.

 

The next portion to change from the code above is the following parameter:

'tagsdiv-post_tag'

Looking on this WordPress Codex page, we find that the parameter we want is the following:

'postexcerpt'

You will need to put this in two places as well.

 

The next piece is the new name you want:

'City'

In our case, we’re going to change that to

'Post Description'

 

The last piece is the name of the function:

'post_tags_meta_box'

 

You can search this page to find the function you’re after. In our case, it’s the following:

'post_excerpt_meta_box'

 

And so when we substitute in all our different pieces of code, it looks like this.

 

add_action( 'add_meta_boxes', 'change_excerpt_meta_box', 0 );
function change_excerpt_meta_box() {
global $wp_meta_boxes;
unset( $wp_meta_boxes['post']['side']['core']['postexcerpt'] );
add_meta_box('postexcerpt',
__('Post Description'),
'post_excerpt_meta_box',
'post',
'side',
'low');
}

And here’s the result.

Featured Plugin - WordPress Membership Site Plugin

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

References

Again, the following two pages will help you to identify what to change:

Look in the Paramaters ($id) section on this WordPress Codex page.

This page has a list of different meta box functions.

 

Make Your Own Plugin

If you would like to turn this code into a simple plugin for your own use, then see this post for instructions.

Note: This only changes the name of your meta boxes on your write/edit screen. It does not change the name of your admin menu items. If that’s a concern, then you will want to look for a plugin that allows you to change you’re the names of your admin menu items.

Featured Plugin - WordPress Appointments Plugin

Take, set and manage appointments and client bookings without having to leave WordPress. Appointments+ makes it easy.
Find out more

Photo: Business Concepts: Hello, My Name Is from BigStock

Tags

Comments (6)

  1. This works amazing, thanks! Can it be made to work on Custom Post Types?

    I want to change ‘Tags’ to ‘Keywords’, and ‘Category’ to ‘Discipline’, and ‘Attributes’ to ‘Course Number’. Works on posts/pages, but what about CPT’s?

  2. Mike – If you have a custom post type, then you should be able to change that in the section where the custom post type was made. Does that make sense? In other words, that wasn’t part of WordPress core — it was added on somehow (maybe with a plugin). Find out how/where it was added, and change it there.

    If you’re working with a special theme and you can’t find it, then you may need to go to the theme developer.

  3. Hi Joe, sure I have been able to change the ‘block heading’ but the word ‘categories’ and tags are still listed in each… eg: All Categories.

    So it is a little confusing to have a different title say… topics and then ALL CATEGORIES.

    Say…. Keywords and then Separate tags with commas.

    • Lance – I see what you’re saying. I’m sure that can probably be changed too, but I’m not sure of the code to do it.

      You might try asking on the WordPress section of Stackexchange. Guys there can be very good with that kind of stuff.

      And of course you might try the forums at wordpress.org too.

Participate