Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Enqueue style for Password Reset page

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.

Related Posts:

  1. Remove Open Sans from Twenty Twelve theme
  2. Enqueue Google Web Fonts Without Messing Up Symbols In URL
  3. Inbuilt style for jquery-ui-datepicker
  4. Why is style.css not being enqueued?
  5. How to conditionally enqueue a stylesheet only for a certain page(s)?
  6. How to enqueue style before style.css
  7. What is the correct way to enqueue multiple CSS files?
  8. Remove wp_add_inline_style
  9. Is it possible to enqueue a raw CSS string directly from within a template file?
  10. Avoid to load default WP styles in login screen
  11. Use wp_enqueue_scripts, not wp_print_styles?
  12. Why isn’t my theme processing SASS?
  13. How to combine multiple CSS files and concatenate JavaScripts if WordPress recommends enqueuing them?
  14. Adding style sheet to specific page
  15. How Can I Use A Child Theme Effectively When Parent’s CSS Is Located in a ‘CSS folder’?
  16. Disable child theme css on certain pages
  17. When enqueing a stylesheet, is it possible to remove the type attribute? [duplicate]
  18. Load custom css after bootstrap
  19. The correct way to include JavaScript and CSS in my WordPress Themes
  20. Is it possible to change the path of a css file that is registered through wp_enqueue_style()?
  21. Relative path instead of absolute for wp_enqueue_script
  22. get_stylesheet_uri returns wrong path
  23. Override load-styles.php with admin screen css
  24. CSS file not registering through add_action
  25. Relative path in wp_register_style not working
  26. Custom Admin CSS styles to style media uploader?
  27. getting url in wp_enqueue_style
  28. How the Css File is Linked without calling it in header.php?
  29. Loading different stylesheet on WordPress pages?
  30. Use wp_add_inline_style to add code to before wp_head?
  31. why enqueued styles in header.php shows in footer?
  32. CSS style button For WP Login Function in page template
  33. How to insert html/css/javascript code to wordpress plugin
  34. Adding external stylesheet after ALL other styles
  35. Different ways to load child theme css
  36. How to enqueue a random css style?
  37. How to override Bootstrap css with my child theme css in wordpress?
  38. Enqueue styles in new site editor in WordPress 5.9
  39. How to organize priority of plugins CSS files?
  40. why this media query is not working / not loading when I put it in child theme?
  41. How do I make header.php use different css for different pages?
  42. Load CSS in footer, like your can with JS?
  43. Child theme stylesheet not always overriding “index”
  44. Child Theme CSS not showing at all
  45. Faster fonts on mobile
  46. Why won’t my custom login page CSS load?
  47. Display Something in the Header After All Styles are Loaded
  48. My CSS suddenly doesn’t load anymore [closed]
  49. How can I force Dynamic CSS via ACF values to update on page load?
  50. functions.php – inject inline css from file
  51. Append style tag in head while shortcode runs
  52. How can I move my custom css to the very bottom of the head section?
  53. CSS getting injected into index from somewhere after theme/custom CSS is loaded, overriding all of my CSS [closed]
  54. enqueing Javascript and CSS
  55. Load custom CSS before admin CSS
  56. Including CSS files in HEAD based on page content
  57. How would one set or override a Fallback font for characters in second language?
  58. First element/selector of enqueued CSS file breaks
  59. WordPress hide the username/password fields in login page
  60. Dequeue styles with query doesn’t work
  61. Save custom option in CSS file
  62. How to enqueue stylesheets in child-theme functions.php?
  63. Dequeing Parent Fontawesome Deques Parent Styles
  64. Add inline CSS to login page with wp_add_inline_style
  65. Bootstrap Integtration
  66. Set different css stylesheet for specific pages [duplicate]
  67. My Child Theme CSS Isn’t Working
  68. Font size decreases when child theme is created from parent theme?
  69. HTML5/CSS3 Polyfill for wp-login.php
  70. Controling css order
  71. Why are my parent styles loading after my child styles?
  72. How to make CSS load live based on options clicked in the theme customizer?
  73. Replacing parent theme’s IE-specific CSS
  74. Browser stacks different versions of style.css
  75. Bootstrap 4 Optimization
  76. Enqueue MCE Editor CSS in admin page
  77. plugin not loading my css and js
  78. Custom theme – Bootstrap CSS not loading via wp_enqueue_style or otherwise
  79. How enqueue CSS out of theme folder?
  80. add custom image to bottom of wordpress default login screen
  81. CSS Selector to override default theme.json custom properties in theme stylesheet
  82. How to change text transparency in HTML/CSS?
  83. CSS float left not working right
  84. Use a higher than 230px logo image with 2013 theme
  85. WordPress on localhost working, when sharing IP to connect receive err_connection_refused on .js and .css files
  86. Load in wp admin assets from child theme
  87. Two column Dropdown for WordPress Toolbar
  88. CSS not applying in admin
  89. How do I use inline styling with WordPress?
  90. WordPress address URL and bloginfo
  91. Invert porfolio item order
  92. Custom CSS on mobile
  93. How to customize Metaboxes?
  94. Change image using only CSS [closed]
  95. Align divs in a basic WordPress site
  96. How can I override an existing custom CSS rule for a specific page
  97. Display current category without an active link in wp_list_categories
  98. WordPress with PageLines theme: how to change the background color of a page? [duplicate]
  99. Twenty Twelve theme: remove margins
  100. Why is TinyMCE 4.x not using updated CSS even with forced reload? [closed]
Categories CSS Tags css, password, wp-enqueue-style, wp-login-form
Rewrite URL Parameter And Force ‘Pretty’ Permalink
How do I Use Nested Loops of Custom Post Types for MultiSite Blogs using WP_Query()

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress