Title: wp_enqueue_style not working
Last modified: August 19, 2016

---

# wp_enqueue_style not working

 *  Resolved [Paul Kaiser](https://wordpress.org/support/users/freakingid/)
 * (@freakingid)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/wp_enqueue_style-not-working/)
 * I am trying to include some JavaScript and CSS with my plugin, and have it only
   show up when Pages or Posts are being Added or Edited in the admin side.
 * No problem with the scripts being queuing up and showing up.
    The stylesheet,
   however, fails to ever show up.
 * I am hooking into:
 *     ```
       add_action( "admin_print_scripts-post-new.php", array($this, 'cs_edit_scripts') );
       add_action( "admin_print_scripts-post.php", array($this, 'cs_edit_scripts') );
       ```
   
 * The ‘cs_edit_scripts’ function is where I both enqueue the javascripts and the
   stylesheets. Again… the javascripts are working.
    I do this as follows: (the 
   extra variable assignments at the top are just a result of me trying to figure
   things out over time…)
 *     ```
       // Get the path to our plugin directory, and then append the js/whatever.js
       $js_path = plugins_url('/js/ui.datepicker.min.js', __FILE__);
       $cs_path = plugins_url('/js/cs-datepicker.js', __FILE__);
       $style_path = plugins_url('/css/ui-lightness/jquery-ui-1.7.3.custom.css', __FILE__);
       wp_register_style('pkstyles', $style_path);
       wp_enqueue_style('pkstyles');
       wp_enqueue_script('jquery');
       wp_enqueue_script('jquery-ui-core');
       wp_enqueue_script('jquery-ui-datepicker', $js_path, array('jquery','jquery-ui-core') );
       // enqueue our own script that makes datepicker work the way we want
       wp_enqueue_script('cs-datepicker', $cs_path, array('jquery','jquery-ui-core','jquery-ui-datepicker') );
       ```
   
 * The javascripts are loaded and working… I get my datepicker… but the stylesheet
   never loads, so it’s ugly.
 * I have double and triple checked the path of the css file, etc.
 * After two days of searching, I’m posting this here, and someone will probably
   point out that I missed a semicolon or something silly.
 * Thanks for any help.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Paul Kaiser](https://wordpress.org/support/users/freakingid/)
 * (@freakingid)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/wp_enqueue_style-not-working/#post-1771237)
 * [solved]
    There is a hook ‘admin_print_styles’ that needs used for stylesheets,
   separate from scripts, so the styles will show up in the right place.

Viewing 1 replies (of 1 total)

The topic ‘wp_enqueue_style not working’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [Paul Kaiser](https://wordpress.org/support/users/freakingid/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/wp_enqueue_style-not-working/#post-1771237)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
