Title: Fatal error: Call to undefined function remove_meta_box()
Last modified: August 19, 2016

---

# Fatal error: Call to undefined function remove_meta_box()

 *  Resolved [JacoboPolavieja](https://wordpress.org/support/users/jacobopolavieja/)
 * (@jacobopolavieja)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-remove_meta_box/)
 * Hello all,
 * I’m trying to remove the “normal” meta box that gets added after registering 
   a new custom taxonomy. I’m calling the function like this:
    `remove_meta_box('
   tagsdiv-main_country','post','core');`
 * And all I’m getting when I try to access the admin panel is:
    `Fatal error: Call
   to undefined function remove_meta_box() in /home4/thehoops/public_html/thm1/wp-
   content/themes/the-hoops-market/functions.php on line 82`
 * I’ve look at the div I want to remove through bugzilla and the ID is good. Besides,
   the error talks about an “undefined” function, not a bad parameter on the function
   or something like that.
 * Any idea what may be happening? Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Michael Fields](https://wordpress.org/support/users/mfields/)
 * (@mfields)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-remove_meta_box/#post-1736109)
 * You are most likely calling the function before it is defined. In a recent project,
   I found that this function is sage to use during the `admin_head` action. Try
   something like this:
 *     ```
       add_action( 'admin_head', 'remove_my_meta_boxen' );
       function remove_my_meta_boxen() {
       	remove_meta_box('tagsdiv-main_country','post','core');
       }
       ```
   
 *  Thread Starter [JacoboPolavieja](https://wordpress.org/support/users/jacobopolavieja/)
 * (@jacobopolavieja)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-remove_meta_box/#post-1736140)
 * Thanks for helping Michael!
 * Unfortunately, this doesn’t output any errors but doesn’t remove the box either.
   I suppose the solution must be something along those lines of including something
   or executing it some way, in order to have the remove_meta_box function defined,
   but can’t find how to correctly do it.
 * Thanks anyway and if I find any solution I’ll write back. Cheers!
 *  [Michael Fields](https://wordpress.org/support/users/mfields/)
 * (@mfields)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-remove_meta_box/#post-1736143)
 * I just looked over some code that removes taxonomy meta boxen and fortunately
   there is a difference from what is posted above. Try using ‘side’ as the third
   parameter instead of ‘core’:
 * `remove_meta_box( 'tagsdiv-main_country','post','side' );`
 *  Thread Starter [JacoboPolavieja](https://wordpress.org/support/users/jacobopolavieja/)
 * (@jacobopolavieja)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-remove_meta_box/#post-1736146)
 * That did the trick!
 * Many many thanks Michael. These tiny things take more time to fix than one might
   thing at first. Another step closer… so thank you a lot for taking the time to
   look at it.
 * Just for curiosity, where did you find that code? Maybe there’s something more
   I can learn ;).
 * Thanks! Cheers!
 *  [Michael Fields](https://wordpress.org/support/users/mfields/)
 * (@mfields)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-remove_meta_box/#post-1736148)
 * No problem, Glad I could help. The code was from an abandoned module for a project
   that I am working on. Not sure it would be of any benefit to be honest.
 *  [azureardee](https://wordpress.org/support/users/azureardee/)
 * (@azureardee)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-remove_meta_box/#post-1736367)
 * Thank you for this! I had the same problem, and putting remove_meta_box in admin_head
   did the trick. Thanks again!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Fatal error: Call to undefined function remove_meta_box()’ is closed 
to new replies.

## Tags

 * [remove_meta_box](https://wordpress.org/support/topic-tag/remove_meta_box/)

 * 6 replies
 * 3 participants
 * Last reply from: [azureardee](https://wordpress.org/support/users/azureardee/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-remove_meta_box/#post-1736367)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
