Title: Adding a stylesheet to a plugin
Last modified: August 19, 2016

---

# Adding a stylesheet to a plugin

 *  Resolved [costintrifan](https://wordpress.org/support/users/costintrifan/)
 * (@costintrifan)
 * [16 years, 12 months ago](https://wordpress.org/support/topic/adding-a-stylesheet-to-a-plugin/)
 * I’m currently working on a plugin and I cannot add a stylesheet to the plugin
   page I’m currently working on.
 * At the moment I’m using javascript to dynamically load the stylesheet but this
   is not the right choice so I need to know how to add that stylesheet into that
   plugin file. I’ve tried using the add_action(‘wp_head’, ‘func’); where the function
   func will return the stylesheet but for some reasons it didn’t work..?
 * Thank you in advance

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

 *  [arizzitano](https://wordpress.org/support/users/amr821/)
 * (@amr821)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/adding-a-stylesheet-to-a-plugin/#post-1080946)
 * I’m having the same problem. Is there a WordPress function to include a stylesheet
   in the options page?
 *  [arizzitano](https://wordpress.org/support/users/amr821/)
 * (@amr821)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/adding-a-stylesheet-to-a-plugin/#post-1080947)
 * Just in case anyone else had this problem, I just figured it out. To get this
   to work for the admin panel page, you have to use the admin_head hook instead
   of wp_head, e.g. add_action(‘admin_head’, ‘func’);
 * The downside to this is that it styles not only your plugin’s page, but all the
   other admin panel pages as well. But this shouldn’t be a problem if your css 
   styles only apply to the elements on your plugin’s admin panel page.

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

The topic ‘Adding a stylesheet to a plugin’ is closed to new replies.

## Tags

 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)

 * 2 replies
 * 2 participants
 * Last reply from: [arizzitano](https://wordpress.org/support/users/amr821/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/adding-a-stylesheet-to-a-plugin/#post-1080947)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
