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

WP SITES

2966

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Subscriptions
  • 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

Your email address will not be published. Required fields are marked *

Primary Sidebar

Code written by Brad Dalton specialist for Genesis & WooCommerce.

Advertise · WPEngine · Genesis · Log in

  • Account
  • Consulting
  • Post Tags
  • Contact
  • Terms
  • Monthly Membership
  • Yearly Subscriptions
  • Log in