Create Plugin to change WordPress Login Form

The code below will allow us to change the WordPress login page in a few steps.

Create plugin to change WordPress login form steps

1 – Create a folder and named with your plugin’s name, example( ns-loginform )

2 – Inside your plugin’s folder we need to create another folder and named  “assets”, this folder will keep our css styling.

3 – On your plugin’s folder create a php file with your text editor and add the code below named your-plugin-name.php the name has to match the plugin’s folder name.

Your plugin php file will look like the same below.

 * Plugin Name:       your-name
 * Plugin URI:
 * Description:       Change logo and style wordpress login form  
 * Version:           1.0
 * Author:            Your Name
 * Author URI:
 * Text Domain:


/*** Function Add Custom Login  ****/
function ns_custom_login_logo() {
   echo '<style type="text/css">h1 a { background-image:url( !important; } body{background: #e0e0e0 !important; }</style>';
add_action('login_head', 'ns_custom_login_logo');

function ns_login_logo_url() {
                return get_bloginfo( 'url' );
add_filter( 'login_headerurl', 'ns_login_logo_url' );

function ns_login_logo_url_title() {
                return 'Nuno Sarmento - Freelance WordPress Developer';
add_filter( 'login_headertitle', 'ns_login_logo_url_title' );


Thank you for seeing my tutorial and fell free to share and comment 🙂 . Do you have a code snippet and you want to see it publish on my site ? I will be more than happy to do it please send me a message (here)



I am a Freelance Web Developer and WordPress Expert based in London with a wealth of website development and support experience. I am great at problem solving and developing quick solutions.


Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.


    Fill in the form below to make an enquiry or find my contact details on my contact page.

  • This form collects your name and email address so that I can respond to the enquiry(ies) that you submit via this website. Please check my privacy policy for the full story on how I use, protect and manage your submitted data.