Title: wp_enqueue_scripts not working
Last modified: November 23, 2018

---

# wp_enqueue_scripts not working

 *  Resolved Anonymous User 16640517
 * (@anonymized-16640517)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/wp_enqueue_scripts-not-working/)
 * Hi I am trying to enqueue css/js into the frontend of my plugin – i.e. whichever
   page/post has the plugin shortcode. I am using the following function. Weirdly,
   the css loads fine in the admin area, but nothing happens in the frontend. Any
   help would be highly appreciated.
 *     ```
       function load_my_style($hook) {	
       	wp_enqueue_style( 'my-style', plugins_url('style.css', __FILE__) );
       }
       add_action( 'admin_enqueue_scripts', 'load_my_style' );
       add_action( 'wp_enqueue_scripts', 'load_my_style' );
       ```
   

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

 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [7 years, 6 months ago](https://wordpress.org/support/topic/wp_enqueue_scripts-not-working/#post-10910590)
 * Hi there!
 * Does it work if you use a different theme?
 *  Thread Starter Anonymous User 16640517
 * (@anonymized-16640517)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/wp_enqueue_scripts-not-working/#post-10912992)
 * Hi yes just realised the plug-in loads in a different theme (not by me). So I
   am guessing my theme is missing a hook? Thanks a lot!
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/wp_enqueue_scripts-not-working/#post-10913381)
 * That’s right. Most themes call wp_head(). You don’t need to use this if you you
   are accomplishing head section elements by other means, but the important part
   of this function you will want to replicate is to do the “wp_head” action. All
   sorts of plugins rely upon this action to fire, so it’s essentially a required
   element of any theme. It’s normally done just before the closing `</head>` element.
   `
   do_action('wp_head');`
 *  Thread Starter Anonymous User 16640517
 * (@anonymized-16640517)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/wp_enqueue_scripts-not-working/#post-10931954)
 * Thanks a lot!

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

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

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 3 participants
 * Last reply from: Anonymous User 16640517
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/wp_enqueue_scripts-not-working/#post-10931954)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
