Change the Login Link URL, Link Title, Login Logo in WordPress 3.4

Updated code snippet. Minor error has been fixed. (There was a missing curly bracket.)

Step 1 – Custom Login Link URL and Link Title Text

The WordPress Admin login page has a WordPress logo above the login form. That logo has a link to WordPress. I had previously posted the way to change the login link url and title (see Custom WordPress Login Url, Url Title, and Logo). However, as of WordPress version 3.4, that method does not work any longer. The custom logo function in that article still works. But the old functions to change the actual URL and title of the link no longer work.

Here is the new way to get a custom link with a custom title on the WordPress login page. Use this function to change the link that appears above the login form on the WordPress admin login page. Be sure to edit ‘yourdomain.com’ below to your own URL. Or you could make it point to any URL you like. Also, be sure to edit line 7 by changing ‘Your Custom Title Text Here’ to the alt text that you for the link.

// Your own login logo url
add_filter('login_headerurl', 
	create_function(false,"return 'http://www.yourdomain.com';"));

// Your own login logo title text
function isacustom_wp_login_title() {
	return 'Your Custom Title Text Here';
}
add_filter('login_headertitle', 'isacustom_wp_login_title');

The link title will change from “Powered by WordPress” to the custom text that you typed in line 7.

Step 2 – Replace the WordPress Login Logo

First, create your own custom logo file. The size should be about 326px by 67px. Name the file wp-loginlogo.png. Place the file in your theme’s /images directory. The path should be: your_theme/images/.

Then drop this function into functions.php:


// CUSTOM LOGIN LOGO PICTURE

function myown_login_logo() {
    echo '<style type="text/css">h1 a { background: url('.get_bloginfo('template_directory').'/images/wp-loginlogo.png) 50% 50% no-repeat !important; }</style>';
}
add_action('login_head', 'myown_login_logo');

Go see how nice that looks.

See more: , ,

By

We've 2 Responses

  1. Pingback: Custom Wordpress Login Url, Url Title, and Logo

  2. February 7th, 2014 at 7:30 am

    WordPress has default login page which has logo linked with wordpress.org, i have been finding the best way to change it and my search ends here.
    Thank you for this awesome tip, keep posting like this….

    avatar

Questions and Comments are Welcome

Your email address will not be published. All comments will be moderated.

Please wrap code in "code" bracket tags like this:

[code]

YOUR CODE HERE 

[/code]