WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I found that the title of the meta box cannot change via the cctm plugin. It shows "Custom Fields" as default, which is pretty annoying to see.


So I decided to change it in function.php, here is my code :

add_filter('add_meta_boxes', 'change_meta_box_titles');
function change_meta_box_titles() {
$wp_meta_boxes['my_post_type']['normal']['core']['cctm_default']['title']= 'Details';}

But it failed to work, any idea?

share|improve this question
up vote 1 down vote accepted

You need to declare the $wp_meta_boxes array as global:

global $wp_meta_boxes; 

If it still doesn't work try:

add_filter('add_meta_boxes', 'change_meta_box_titles');
function change_meta_box_titles() {
    global $wp_meta_boxes;
    echo '<pre>';
    echo '</pre>';

to see what's going on (and to check where the title is). You should also prefix your function names to prevent a clash with WP or other plug-ins.

share|improve this answer
Hi,I added the global $wp_meta_boxes; but still not working, and your function cause me a fatal error where causing fails to access the entire site. i also try prefix, no luck as well. – dev-jim Apr 19 '12 at 9:15
There was a missing semi-colon after global $metaboxes. I've edited the answer. The prefix won't solve the problem - but it may prevent you encountering another one! – Stephen Harris Apr 19 '12 at 9:55
Waw...it works. I found the correct array circle. Thanks... – dev-jim Apr 19 '12 at 10:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.