ewp_logo_slant

Edinburgh Word Press

WordPress development, customisation and jiggery-pokery from Edinburgh, Scotland

Menu

Skip to content
  • Contact

Tag Archives: jetpack

How to stop WordPress loading styles on your login page

Posted on September 22, 2016 by Dave Fitch

WordPress – or should I say JetPack – has a lovely habit of loading a large amount of cruft that you may not want on your page. After the recent WP 4.6.x update I found the custom login page on one of my sites didn’t load properly anymore, because all the custom css was being over-ridden by css files WP was injecting at page load. This function stops this injection:

add_action( 'login_init', function() {
    wp_deregister_style( 'login' );
    wp_register_style( 'login', "" );
    wp_deregister_style( 'buttons' );
    wp_register_style( 'buttons', "" );
    wp_deregister_style( 'l10n' );
    wp_register_style( 'l10n', "" );
    wp_deregister_style( 'forms' );
    wp_register_style( 'forms', "" );
    wp_deregister_style( 'dashicons' );
    wp_register_style( 'dashicons', "" );
} );
Tagged css, jetpack, login | Leave a comment

Post navigation

Recent Posts

  • Why don’t my custom taxonomies show up in WordPress post edit pages?
  • Posts not loading in the WordPress app?
  • Debugging WordPress Media imports
  • Removing auto-generated WordPress thumbnail images
  • Working with excerpts in WordPress, or why isn’t this filter working?

Archives

  • September 2020
  • July 2020
  • December 2019
  • November 2019
  • October 2016
  • September 2016
  • May 2013
  • April 2013
  • December 2012
  • September 2012
  • August 2012

Categories

  • wordpress

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Contact us:

Online form +44 78 76 78 6316

Paper mail:

114 Blackford Avenue, Edinburgh, Scotland, EH8 9HH

Follow us:

twitter RSS mailing list

Content:

© 2023 EdinburghWP - Wordpress design and customisation