Debugging an error: wp_enqueue_style was called incorrectly

In other words, you should not perform a wp_enqueue_style which is not hooked to wp_enqueue_scripts.

Your wp_enqueue_style should be in a function, and you should hook that function to wp_enqueue_scripts like in the following example:

function wpse88755_enqueue(){
  # call  wp_enqueue_style here
}

#hook the function to wp_enqueue_scripts
add_action( 'wp_enqueue_scripts', 'wpse88755_enqueue' );

Leave a Comment