That’s pretty fine and it’s the proper way to add CSS to login page. But you can also change login page CSS by below code-
function the_dramatist_custom_login_css() {
echo '<style type="text/css"> //Write your css here </style>';
}
add_action('login_head', 'the_dramatist_custom_login_css');
This actually prints CSS code inline in the login page. And for admin CSS your way is correct.
Related Posts:
- What exact CSS minifier does WP core use?
- WordPress Dashboard is loaded without css
- Change css for tag in wordpress admin
- How to change text size on category pages
- prevent front end theme from injecting css into wp-admin
- WordPress Customizer Additional CSS – line numbers overlaps CSS code
- No CSS being loaded on backend
- wordpress wp-admin css not loading
- Adjust the Device Preview sizes used in the WP 4.5 Customizer
- How do i use fontawesome icons in TinyMce editor?
- Add visit site to your toolbar instead of being in the dropdown
- How to hide menu on WordPress admin
- Simple/basic use of get_current_screen
- Is it possible to be more page/post specific with admin_enqueue_script?
- Gutenberg Block Editor Match Admin Styles & Frontend Styles
- What is better way to use Bootstrap inside admin panel?
- Hide Front-End Admin Bar Including 32 px Spacing
- Changing Gutenberg / WP block editor width only on pages, not posts or other taxonomies
- Deregister CSS style link ‘open-sans-css’
- How to add background image control to page admin controls?
- How to add a class to the element in a custom Gutenberg block
- enqueue admin styling and scripts only on plugin page
- Set admin body to ltr on a rtl installation
- Remove style `?ver=` from `/wp-admin/upgrade.php`
- editor-style.css Functionality
- Different css rules for TinyMCE and Gutenberg while using add_editor_style()
- Add css code in admin_enqueue_scripts
- Adding HTML tags or css classes to admin columns
- How To Differentiate Drafted product and Publish Product through Color?
- Admin WP List Table Columns Missing
- Load in wp admin assets from child theme
- Is it possible to switch Gutenberg’s editor styles when document settings change?
- Admin pages missing css
- How to apply a CSS file to my admin pages?
- Why is server preventing admin styles? (Was: Where are WordPress sessions saved?)
- how to add stylesheet to particular plugin only?
- Admin style for just one plugin in dashboard
- How to enable table overflow scroll? (especially order list table)
- Can’t resize logo in responsive theme?
- Dashicons and Pseudo :before
- How to disable the hover effect in WordPress and Elementor?
- How to stop my themes CSS changing the WordPress interface/?
- Distributing Frontend Assets with Plugins
- Adding CSS to admin TinyMCE editor for custom button
- make admin.css in my child theme
- hide elements of admin with css file
- dynamic css file for admin / backend and get_option results in Uncaught Error: Call to undefined function get_option()
- Notice-Updated div moving around unprompted
- WP components no style
- Gutenberg – Remove add block button
- Change the color of the Password Protected Post titles
- Is it possible to load the css just on my plugin admin page?
- Override Admin menu icon
- Enqueue a file that’s not js or css
- Apply custom css for user role
- How to reference an existing css content-based icon, within my admin menu hook
- Margin problem on management menu?
- Custom css author role
- Media Upload not working after hiding some elements from functions.php
- Restrict CSS on one page
- Button doesn’t work in the profile panel
- ACF Gut block broke wordpress default style?
- WordPress Sudden Loss of All CSS And Tons of JQuery Errors
- How can I add a stylesheet to the Classic Editor page?
- How to change the WordPress Plugin Watson Assistant Chatbot BOX Size?
- Stop custom Gutenberg styles taking over other admin bits?
- Twenty-seventy theme remove additional CSS from head
- Run function for specific user only
- Admin bar default color scheme for nonregistered/nonlogged users
- Lines of CSS only being delivered while logged in
- When admin is logged in, admin-bar-rtl.min.css is not loaded on website view (the admin-bar is shown in the footer without CSS)
- Style Radio Buttons inside Edit Page (Custom Fields)
- wp_is_mobile() inside js
- conditionally update css on edit.php
- Simple CSS admin pagination
- Adding custom css to a theme depending on whether the admin user is logged in or not
- Change Login CSS – Include instead of echo
- custom css in admin panel by user id
- theme injecting css into wp-admin
- Target “admins” with different styles on the front end [closed]
- Where are the Parent themes CSS & PHP files hidden on WordPress?
- Enqueue MCE Editor CSS in admin page
- CSS Styles specific to Admin Sidebar not loading
- React Material UI and WordPress Admin Area
- Custom customizer CSS priority
- RTL in WordPress or Elementor editor