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

How can i remove the border/box on a custom meta box?

I need to remove the class "postbox" from a custom meta box, so that it looks just plain.

How can i do that?

share|improve this question

The postbox class is hardcoded into the do_meta_boxes() function which is responsible for rendering meta boxes, and is not customizable via filters. Thus, I guess your best bet would be removing it using javascript. This should do it:


add_action('admin_init', 'wpse_87339_admin_init');
function wpse_87339_admin_init() {
    wp_enqueue_script('wpse_87339_admin', get_stylesheet_directory_uri() . '/js/admin.js', array('jquery'));


jQuery(document).ready(function($) {
    // Remove all .postbox classes from sidebar
    $('#side-sortables .postbox').removeClass('postbox');

    // Remove .postbox from specific metabox (page attributes)
share|improve this answer

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.