As seen here: https://stevegrunwell.com/blog/quick-tip-is_login_page-function-for-wordpress/
Add this function:
if ( ! function_exists( 'is_login_page' ) ) {
function is_login_page() {
return in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) );
}
}
Then you can use:
if ( ! is_admin() && ! is_login_page() ) {
wp_enqueue_style( 'base' );
wp_enqueue_script( 'main' );
}
Revisions
- November 23, 2016 @ 11:47:03 [Current Revision] by PeterLugg
- November 23, 2016 @ 11:47:03 by PeterLugg
No comments yet.