Different back-end colour scheme for the different sites of a multisite

Add to your functions.php file the following code, this will hook into your admin header section and will place the style you chose accordingly to the matching site.

add_action('admin_enqueue_scripts', 'my_admin_background');

function my_admin_background() {
  wp_enqueue_style(
    'custom-style',
    get_template_directory_uri() . '/css/custom_script.css'
  );
      global $blog_id;
      $color="";
      if ($blog_id == 1) {
         $color="white";
      } elseif ($blog_id == 2) {
         $color="red";
      } elseif ($blog_id == 3) {
         $color="blue";
      } else {
         $color="yellow";
      } 
      $custom_css = "<style> body { background: $color } </style>";
  wp_add_inline_style( 'custom-style', $custom_css );
}

Leave a Comment