Your code works fine just the way you have it - I tried it. Maybe you have another plugin that unhooks existing login_enqueue_scripts
hooks disabling yours?
Otherwise it works provided:
- The code is in a plugin;
- style-login.css file is in the same directory as the plugin;
- Some WP CSS uses
!important
; such as body{ background }
. So,
you'll need !important
for your CSS properties to override WP.
UPDATE 02/07/16:
Your updated information makes a really big difference!
The code will only work as desired on a WP single site install, not multisite. You have a multisite install using subfolders.
Notice the links in your updated question:
http://dev.yazminmedia.com/tresstank/wp-login.php
http://dev.yazminmedia.com/wp-login.php?action=lostpassword
The password reset link points to your main site not the tresstank
subsite.
It's not a plugin conflict issue, it's a WP redirect issue.
Try this link: http://yazmin.bkstest.com/wp-login.php then click on "Lost your password?". It will not redirect to the main site and the login style will still be applied because I use the code that can be found here https://gist.github.com/eteubert/293e07a49f56f300ddbb to change the default WP behavior. It's a must have for multisites. It solves issues with links in the password reset emails pointing the user to the main site (where they can't login) instead of the subsite they are a member of.
If you add the code from the above gist to your plugin your problem will most likely be solved. It works great on subdomain setups but I haven't tested it with subfolder installs.
NOTE: The code from the gist should be placed in a network activated plugin.
login_enqueue_script
it gets called independent of theaction
URL parameter. (WP 4.4.2, listener registered directly in functions.php and a plugin main file.)