Enqueued scripts and styles loading in WordPress Dashboard as well

The “init” action runs both on frontend page loads, and on backend page loads.

Try hooking these to the “wp_enqueue_scripts” action instead. I believe it does not run on admin page loads.

Example Code: (By OP)

function wpse54388_scripts_styles() {

    wp_enqueue_style( ... );

    wp_enqueue_script( ... );

}
add_action( 'wp_enqueue_scripts', 'wpse54388_scripts_styles' );

Leave a Comment