• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Add Admin Style Sheet

This PHP code enables you to add CSS rules to a new style sheet named admin.css which should be placed in the root directory of your child themes folder.

Please copy ALL the code and paste it at the end of your child themes functions.php file using a text editor like Notepad++

add_action( 'admin_enqueue_scripts', 'enqueue_admin_style_sheet' );
function enqueue_admin_style_sheet() {

	wp_register_style( 'admin-css', get_stylesheet_directory_uri() . '/admin.css', false, '1.0.0' );
	wp_enqueue_style( 'admin-css' );

}

Adding CSS code to your main child themes style sheet will not work in your wp admin area.

Related Solutions

  • How To Add A Second Style Sheet In Your Theme
  • How To Deregister & Dequeue Style Sheets

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags