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)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘wp_enqueue_scripts not working’ is closed to new replies.