質問

How can I remove css rules apply on dashboard in wordpress? I make a theme and the css rules are applied inside the dashboard.

In functions.php is write this code :

wp_register_style('styles',get_bloginfo('template_url')."/css/styles.css");
wp_register_style('bootstrap',get_bloginfo('template_url')."/css/bootstrap.css");
wp_register_style('bootstrap-responsive',get_bloginfo('template_url')."/css/bootstrap-responsive.css");
wp_enqueue_style('bootstrap');
wp_enqueue_style('bootstrap-responsive');
wp_enqueue_style('styles');
役に立ちましたか?

解決

It's spilling in the admin area because you need to wrap all that in the appropriate hook:

add_action( 'wp_enqueue_scripts', 'my_enqueue' );

function my_enqueue()
{
    // Register and enqueue CSS and JS here
}

See: Action_Reference/wp_enqueue_scripts

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top