As seen here: https://stevegrunwell.com/blog/quick-tip-is_login_page-function-for-wordpress/
Add this function:
[php]if ( ! function_exists( 'is_login_page' ) ) {
function is_login_page() {
return in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) );
}
}[/php]
Then you can use:
[php]if ( ! is_admin() && ! is_login_page() ) {
wp_enqueue_style( 'base' );
wp_enqueue_script( 'main' );
}[/php]
Revisions
- November 23, 2016 @ 11:47:03 [Current Revision] by PeterLugg
- November 23, 2016 @ 11:47:03 by PeterLugg
Revision Differences
There are no differences between the November 23, 2016 @ 11:47:03 revision and the current revision. (Maybe only post meta information was changed.)
No comments yet.