Stop wp_login.php from loading non-admin styles
-
I have used the wp_enqueue funtion to load customized style sheets. I have prevented them from loading on admin pages, and not on the login page which (I understand is not an admin page).
– How do I write the conditional statement to prevent the styles from loading for both admin and the login pages.
Here is my functions.php file using the TwentySixteen parent theme.<?php // register styles wp_register_style('parent-style', get_template_directory_uri() . '/style.css'); // load styles only if this is not an admin page if ( ! is_admin() ) wp_enqueue_style( 'parent-style'); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Stop wp_login.php from loading non-admin styles’ is closed to new replies.