0

I'm loading my own stylesheet on the wp-login.php page using the login_enqueue_scripts hook so I have no need for the default styles that come with that page. Is it possible to dequeue styles associated with wp-login.php?

Elsewhere in WordPress, I use wp_dequeue_style() to remove a CSS file enqueued with wp_enqueue_style(). I'm unsure if the process would be the same for wp-login.php.

0

Yes, it's possible, You can use the wp_dequeue_style(), you just have to pass the handler 'login'.

function wp_stackexchange_267327() {
    wp_dequeue_style( 'login' );
}
add_action( 'login_enqueue_scripts', 'wp_stackexchange_267327' );
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.