As seen here: https://stevegrunwell.com/blog/quick-tip-is_login_page-function-for-wordpress/
Add this function:
1 2 3 4 5 | 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:
1 2 3 4 | if ( ! is_admin() && ! is_login_page() ) { wp_enqueue_style( 'base' ); wp_enqueue_script( 'main' ); } |
Revisions: (Show)
No comments yet.