Add Admin CSS


Ever want to tweak the appearance of the WordPress admin pages by hiding stuff, moving stuff around, changing fonts, colors, sizes, etc? Any modification you may want to do with CSS can easily be done via this plugin.

Using this plugin you’ll easily be able to define additional CSS (inline and/or files by URL) to be added to all administration pages. You can define CSS to appear inline in the admin head (within style tags), or reference CSS files to be linked (via “link rel=’stylesheet'” tags). The referenced CSS files will appear in the admin head first, listed in the order defined in the plugin’s settings. Then any inline CSS are added to the admin head. Both values can be filtered for advanced customization (see Advanced section).

Links: Plugin Homepage | Plugin Directory Page | Author Homepage


You can also programmatically add to or customize any CSS defined in the “Admin CSS” field via the c2c_add_admin_css filter, like so:

 * Add CSS to admin pages.
 * @param string $css String to be added to admin pages.
 * @return string
function my_admin_css( $css ) {
    $css .= "
        #site-heading a span { color:blue !important; }
        #favorite-actions { display:none; }
    return $css;
add_filter( 'c2c_add_admin_css', 'my_admin_css' );

You can also programmatically add to or customize any referenced CSS files defined in the “Admin CSS Files” field via the c2c_add_admin_css_files filter, like so:

 * Add CSS file(s) to admin pages.
 * @param array $files CSS files to be added to admin pages.
 * @return array
function my_admin_css_files( $files ) {
    $files[] = '';
    return $files;
add_filter( 'c2c_add_admin_css_files', 'my_admin_css_files' );


  1. add-admin-css screenshot 1

    A screenshot of the plugin’s admin settings page.


  1. Unzip inside the /wp-content/plugins/ directory for your site (or install via the built-in WordPress plugin installer)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. Go to “Appearance” -> “Admin CSS” and add some CSS to be added into all admin pages.


Can I add CSS I defined via a file, or one that is hosted elsewhere?

Yes, via the “Admin CSS Files” input field on the plugin’s settings page.

Can I limit what admin pages the CSS gets output on?

No, not presently. At least not directly. By default, the CSS is added for every admin page on the site.

However, you can preface your selectors with admin page specific class(es) on ‘body’ tag to ensure CSS only applies on certain admin pages. (e.g. body.index-php h2, #icon-index { display: none; }).

Or, you can hook the ‘c2c_add_admin_css’ and ‘c2c_add_admin_css_files’ filters and determine the current admin page content to decide whether the respective hook argument should be returned (and thus output) or not.

Can I limit what users the CSS applies to?

No, not presently. At least not directly. By default, the CSS is added for any user that can enter the admin section of the site.

You can hook the ‘c2c_add_admin_css’ and ‘c2c_add_admin_css_files’ filters and determine the current user to decide whether the respective hook argument should be returned (and thus output) for the user or not.

Does this plugin include unit tests?



Wrecks Site

Fatal error: Call to undefined function boolval() in …/plugins/admin-css-mu/admincssmu.php on line 275

Great outcome for WP 4.6

Perfect to overcome the crappy native font idea of WordPress 4.6 🙂

Just add:

body, textarea, #wpadminbar * {
font-family: “Open Sans”, sans-serif;

Lees alle 23 beoordelingen

Bijdragers & ontwikkelaars

“Add Admin CSS” is open source software. De volgende personen hebben bijgedragen aan deze plugin.


“Add Admin CSS” is vertaald in 1 taal. Dank voor de vertalers voor hun bijdragen.

Vertaal “Add Admin CSS” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.


1.4 (2016-01-10)

* This release fixes a couple of bugs, adds support for language packs, and has many minor behind-the-scenes changes.

* Bugfix: Allow CSS links/files with query args to be enqueued.
* Bugfix: If specified as part of the link, ‘ver’ query arg takes precedence as script version.
* Add: More unit tests.
* Add: Amend a couple of the FAQ answers to indicate things are possible via hooks rather than suggesting they aren’t possible.
* Change: Update plugin framework to 040:
* Change class name to c2c_AddAdminCSS_Plugin_040 to be plugin-specific.
* Set textdomain using a string instead of a variable.
* Don’t load textdomain from file.
* Change admin page header from ‘h2’ to ‘h1’ tag.
* Add c2c_plugin_version().
* Formatting improvements to inline docs.
* Change: Add support for language packs:
* Set textdomain using a string instead of a variable.
* Remove .pot file and /lang subdirectory.
* Change: Declare class as final.
* Change: Explicitly declare methods in unit tests as public or protected.
* Change: Minor tweak to description.
* Change: Minor improvements to inline docs and test docs.
* Add: Create empty index.php to prevent files from being listed if web server has enabled directory listings.
* Change: Note compatibility through WP 4.4+.
* Change: Remove support for versions of WordPress older than 4.1.
* Change: Update copyright date (2016).

1.3.4 (2015-04-30)

  • Bugfix: Fix line-wrapping display for Firefox and Safari
  • Enhancement: Add an additional unit test
  • Update: Move ‘Advanced’ section lower in readme; add inline docs to example code
  • Update: Note compatibility through WP 4.2+

1.3.3 (2015-02-21)

  • Bugfix: Revert back to using dirname(__FILE__); __DIR__ is only PHP 5.3+

1.3.2 (2015-02-16)

  • Update plugin framework to 039
  • Add to and improve unit tests
  • Explicitly declare class method activation() and uninstall() static
  • Use DIR instead of dirname(__FILE__)
  • Various inline code documentation improvements (spacing, punctuation)
  • Note compatibility through WP 4.1+
  • Update copyright date (2015)
  • Regenerate .pot

1.3.1 (2014-08-23)

  • Update plugin framework to 038
  • Minor plugin header reformatting
  • Minor code reformatting (spacing, bracing)
  • Change documentation links to to be https
  • Localize an additional string
  • Note compatibility through WP 4.0+
  • Regenerate .pot
  • Add plugin icon

1.3 (2014-01-03)

  • Add unit tests
  • Update plugin framework to 036
  • Improve URL path construction
  • Use explicit path for require_once()
  • Add reset() to reset object to its initial state
  • Remove __clone() and __wake() since they are part of framework
  • For options_page_description(), match method signature of parent class
  • Note compatibility through WP 3.8+
  • Drop compatibility with versions of WP older than 3.5
  • Update copyright date (2014)
  • Change donate link
  • Minor readme.txt tweaks (mostly spacing)
  • Add banner
  • Update screenshot


  • Move ‘Advanced Tips’ section from bottom of settings page into contextual help section
  • Add help_tabs_content() and contextual_help()
  • Prevent textareas from wrapping lines
  • Display fonts properly in textareas
  • Change input fields to be displayed as inline_textarea instead of textarea
  • Add instance() static method for returning/creating singleton instance
  • Made static variable ‘instance’ private
  • Add dummy __clone() and __wakeup()
  • Remove support for previously deprecated ‘c2c_add_admin_css’ global
  • Remove c2c_AddAdminCSS(); only PHP5 constructor is supported now
  • Update plugin framework to 035
  • Discontinue use of explicit pass-by-reference for objects
  • Add check to prevent execution of code if file is directly accessed
  • Regenerate .pot
  • Re-license as GPLv2 or later (from X11)
  • Add ‘License’ and ‘License URI’ header tags to readme.txt and plugin file
  • Minor documentation improvements
  • Note compatibility through WP 3.5+
  • Drop compatibility versions of WP older than 3.1
  • Update copyright date (2013)
  • Minor code reformatting (spacing)
  • Remove ending PHP close tag
  • Create repo’s assets directory
  • Move screenshot into repo’s assets directory


  • Rename class from ‘AddAdminCSS’ to ‘c2c_AddAdminCSS’
  • Rename filter from ‘add_admin_css’ to ‘c2c_add_admin_css’
  • Rename filter from ‘add_admin_css_files’ to ‘c2c_add_admin_css_files’
  • Update plugin framework to 029
  • Save a static version of itself in class variable $instance
  • Deprecate use of global variable $c2c_add_admin_css to store instance
  • Explicitly declare all functions as public
  • Add __construct(), activation(), and uninstall()
  • Note compatibility through WP 3.3+
  • Drop compatibility with versions of WP older than 3.0
  • Add .pot
  • Add ‘Domain Path’ plugin header
  • Minor code formatting changes (spacing)
  • Update copyright date (2011)
  • Add plugin homepage and author links in description in readme.txt


  • Initial release (not publicly released)