changing body background color for custom post type in admin backend

Easy and your css to overwrite the default style like this

add_action('admin_print_styles', 'auctions_admin_print_styles_332');

function auctions_admin_print_styles_332(){
   if ((isset($_GET['post_type']) && $_GET['post_type'] == 'auctions') || (isset($post_type) && $post_type == 'auctions')){

     //include your css file using wp_enqueue_style() somthing like 
      wp_enqueue_style( 'handle name', plugins_url('/style.css', __FILE__), array(), '1.0' );

      // or a more hackish way would be to echo out the css style tag
  }
}

so the class you are looking for is actualy an id “wpwrap” so you can use something like this:

<style type="text/css">
#wpwrap{background-color: #FFF;}
</style> 

Hope this helps

Leave a Comment