Title: Enqueue CSS Correctly
Last modified: August 20, 2016

---

# Enqueue CSS Correctly

 *  Resolved [Jon Brown](https://wordpress.org/support/users/jb510/)
 * (@jb510)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/enqueue-css-correctly/)
 * wp_enqueue_style() isn’t hooked correctly
 * custom-about-author.php:41
 * change out to:
 *     ```
       // Enqueue plugin style-file
       add_action( 'wp_enqueue_scripts', 'caa_add_my_stylesheet' );
       function caa_add_my_stylesheet() {
       	wp_enqueue_style('cab_style', $caa_plugin_dir_path.'/cab-style.css');
       }
       ```
   
 * then no more debug errors 🙂
 * [http://wordpress.org/extend/plugins/custom-about-author/](http://wordpress.org/extend/plugins/custom-about-author/)

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

 *  Thread Starter [Jon Brown](https://wordpress.org/support/users/jb510/)
 * (@jb510)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/enqueue-css-correctly/#post-3497601)
 * Oops, didn’t notice you’re using a var for the path.
 * Should be:
    // Enqueue plugin style-file add_action( ‘wp_enqueue_scripts’, ‘caa_stylesheet’);
   function caa_stylesheet() { wp_enqueue_style(‘cab_style’, plugins_url(‘/cab-style.
   css’, __FILE__) ); }
 * (that’s actually tested and working)
 *  Plugin Author [edwinkwan](https://wordpress.org/support/users/edwinkwan/)
 * (@edwinkwan)
 * [13 years ago](https://wordpress.org/support/topic/enqueue-css-correctly/#post-3497723)
 * Thanks Jon Brown,
 * I’ve added the change to version 1.5.3

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

The topic ‘Enqueue CSS Correctly’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-about-author.svg)
 * [Custom About Author](https://wordpress.org/plugins/custom-about-author/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-about-author/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-about-author/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-about-author/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-about-author/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-about-author/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [edwinkwan](https://wordpress.org/support/users/edwinkwan/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/enqueue-css-correctly/#post-3497723)
 * Status: resolved