Tag Info

Hot answers tagged

4

First thing to mention is that you don't need to use wp_register_style if enqueuing within the same function. You can replace it with wp_enqueue_style and remove the duplicate. As for why your stylesheet isn't loading, start by checking the file path. Try this instead: wp_enqueue_style('cl-chanimal-styles', plugin_dir_url( __FILE__ ) . ...


2

You can set the priority in hook. Priority is the 3rd parameter in the hook. In the following example, wp_enqueue_scripts will have priority of 99 which is higher than normal priority. Default priority is 10. So it will load at last function load_last_style() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', ...



Only top voted, non community-wiki answers of a minimum length are eligible