This mu-plugin allows you enqueue style on login page. The plugin will look for styles into :
- dist/assets/login.css of the child theme
- dist/assets/login.css of the parent theme
- WP_DEFAULT_THEME/dist/assets/login.css
- WP_CONTENT_DIR/wp-login-page/login.css
- WordPress > 4.7
- PHP > 5.6
composer require beapi/wp-login-page
Just download the wp-login-page.php
into your mu-plugins directory.
- Fix platform URL construction
- Add test on empty final file
- First release
Allows you to change the theme filepath.
If you need to change the filepath to theme/my_theme/assets/my-custom-login.css
<?php
add_filter( 'wp_login_page_theme_css', function( $folders ) {
return array_merge( $folders, [ 'assets/my-custom-login.css' ] );
});
Allows you to change the platform global filepath.
If you need to change the filepath to wp-content/customs/my-custom-login.css
<?php
add_filter( 'wp_login_page_platform_css', function() {
return 'customs/my-custom-login.css';
});
Example of CSS for cutomizing the logo :
body.login h1 a {
display: block;
width: 100%;
background-image: url(wapuu.png);
background-repeat: no-repeat;
background-position: center center;
background-size: 103px;
}
Launch the local machine with lando:
lando start
lando setup
- Open you browser at https://wp-login-page.lndo.site/wp-login.php