Title: Customizing admin CSS
Last modified: August 20, 2016

---

# Customizing admin CSS

 *  [leisegang](https://wordpress.org/support/users/leisegang/)
 * (@leisegang)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/customizing-admin-panel/)
 * I want to add some CSS code to the admin theme.
    If the color scheme is FRESH
   then i want to add some style. If not i want to use another CSS file.
 * When doing a print_r($layout); it says classic ( i use that) but it adds the 
   dark.css file.
    What am i doing wrong?
 *     ```
       function css_admin_head() {
       	global $user_ID;
       	$layout = get_user_meta($user_ID, 'admin_color', true);
       		if ($layout = 'fresh') {
       			echo '<link rel="stylesheet" type="text/css" href="' .plugins_url('dark.css', __FILE__). '">';
       			}
       		else {
       			echo '<link rel="stylesheet" type="text/css" href="' .plugins_url('light.css', __FILE__). '">';
       			}
       }
   
       add_action('admin_head', 'css_admin_head');
       ```
   

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

 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [13 years, 6 months ago](https://wordpress.org/support/topic/customizing-admin-panel/#post-3244701)
 * Moved to WP-Advanced (this isn’t a Multisite thing, it’s general WP)
 * > When doing a print_r($layout); it says classic ( i use that)
 * What’s the full output?
 *  Thread Starter [leisegang](https://wordpress.org/support/users/leisegang/)
 * (@leisegang)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/customizing-admin-panel/#post-3244702)
 * This is the full output:
    `<link rel="stylesheet" type="text/css" href="http://
   blogurl.net/wp-content/plugins/admin-theme/dark.css">`
 * And the print_r($layout); prints “classic” thats it.
 * and if i enable the fresh layout on my user profile it prints “fresh”. So that
   works.
 * i think my “error” is: if ($layout = ‘fresh’)
    But i dont know what to type here.
 *  [DigitalDesignDj](https://wordpress.org/support/users/digitaldesigndj/)
 * (@digitaldesigndj)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/customizing-admin-panel/#post-3244710)
 * your “error” is: if ($layout = ‘fresh’)
 * try:
    `if ($layout == 'fresh')`
 * PHP and JavaScript behave similarly:
    [http://www.w3schools.com/js/js_comparisons.asp](http://www.w3schools.com/js/js_comparisons.asp)
 *  Thread Starter [leisegang](https://wordpress.org/support/users/leisegang/)
 * (@leisegang)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/customizing-admin-panel/#post-3244723)
 * Thanks! That worked!
 * Such an easy fix! Just a = too little!
 *  [steadyone](https://wordpress.org/support/users/steadyone/)
 * (@steadyone)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/customizing-admin-panel/#post-3244832)
 * Okay I need helpppppppppp! I am trying to change the color of my menu fonts. 
   I have looked through sop many codex pages my eyes are blurry. My CSS page is
   different to all the ones I see online that they are changing in the codex area.
   I have the these Portfolio Press theme.
 * I want to be able to change the font size and color of the menu and body.
 * Please help.
 * Thanks signed frustrated.
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/customizing-admin-panel/#post-3244833)
 * **[@steadyone](https://wordpress.org/support/users/steadyone/)** – your question
   is not the same as this one – and this is not the right forum for it either. 
   If you need help with Portfolio Press theme, please start a new thread here:
   
   [http://wordpress.org/support/theme/portfolio-press](http://wordpress.org/support/theme/portfolio-press)

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

The topic ‘Customizing admin CSS’ is closed to new replies.

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [color](https://wordpress.org/support/topic-tag/color/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [scheme](https://wordpress.org/support/topic-tag/scheme/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 6 replies
 * 5 participants
 * Last reply from: [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/customizing-admin-panel/#post-3244833)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
