• Resolved scottcarlton

    (@scottcarlton)


    I searched and search to find how to remove the css styling from wp-login.php. After several searches I found this. By Frank on wpengineer. It completely removes the css styling. The reason I am posting this because there were serveral entries out there that didn’t completely remove it. It just allowed you to set another style sheet. Hope this helps someone. This goes into your function.php

    https://wpengineer.com/739/removing-wordpress-login-design/

    if ( basename($_SERVER['PHP_SELF']) == 'wp-login.php' )
        add_action( 'style_loader_tag', create_function( '$a', "return null;" ) );
    function your_login_stylesheet() { ?>
       <link rel="stylesheet" href="<?php echo get_bloginfo( 'stylesheet_directory' ) . '/login-styles.css'; ?>" type="text/css" media="all" />
    <?php }
    add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );
Viewing 1 replies (of 1 total)
  • Thread Starter scottcarlton

    (@scottcarlton)

    Sorry this is the correct code for the stylesheet.

    if ( basename($_SERVER['PHP_SELF']) == 'wp-login.php' )
        add_action( 'style_loader_tag', create_function( '$a', "return null;" ) );
    
    function your_login_stylesheet() { ?>
       <link rel="stylesheet" href="<?php echo get_bloginfo( 'stylesheet_directory' ) . '/login-styles.css'; ?>" type="text/css" media="all" />
    <?php }
    add_action( 'login_enqueue_scripts', 'your_login_stylesheet' );
Viewing 1 replies (of 1 total)
  • The topic ‘Removing CSS from Login’ is closed to new replies.