Lightning Rank - Private Blog Network

  • Home
  • Done 4 You PBN Service
  • Use My Premium PBN
  • Other Services
    • Amazon Associate Audit
    • Editorial Links
    • Buy Expired Domains
  • Contact
    • Affiliates

Change WordPress Login Logo Without Plugins

November 20, 2015 By Jon Gillham Leave a Comment

Change WordPress login logo without plugins in this simple tutorial. There are several reasons why you would want to change the default WordPress login logo of your WordPress site, maybe your building a site for a client, you want members registering for your site to see a custom logo or you simply want to add some personal eye candy when logging into your site.

Whatever the reason the WordPress login logo is very simple to change without using any additional plugins by simply creating your image and adding some code to your WordPress themes functions.php file. This code will also now make it that when the login logo is clicked your are redirected to your sites homepage, the default WordPress login logo redirects your to WordPress.org.

Wrong Way

The original WordPress login logo image is located in the wp-admin/images folder of your WordPress install, if you simply overwrite that image future WordPress updates have the potential to overwrite your custom logo and revert it back to it’s default install logo. I have seen this being done by site owners in the past, it’s always better never to edit any WordPress core files even images so please don’t use this method.

Right Way With functions.php Code

Firstly you will require an image that you have created of your custom WordPress login logo, that image should be the dimensions below that are the same as the original and of transparent background .png format.

  • Image Width: 274px
  • Image Height: 63px

Name your image custom-login-logo.png and save it to your WordPress themes images folder.

Next open your themes functions.php file and copy the code block below and past it into your functions.php file at the very bottom, save the file. This code adds a filter to the WordPress login_head function and replaces the default logo with your custom logo.

add_action( 'login_head', 'wp_custom_login');
function wp_custom_login() {
	echo '<style type="text/css">
	h1 a { background-image:url('. get_stylesheet_directory_uri() . '/images/custom-login-logo.png' . ') !important; margin-bottom: 10px; }
	padding: 20px;}
	</style>
	<script type="text/javascript">window.onload = function(){document.getElementById("login").getElementsByTagName("a")[0].href = "'. site_url() . '";document.getElementById("login").getElementsByTagName("a")[0].title = "Go to site";}</script>';
}

Now visit your WordPress login page and you should now see your custom WordPress login logo being displayed. If you don’t see your new logo try clearing your browser cache and refreshing the page several times. If you still don’t see your new login logo double check your image path and logo file name again.

As always any improvements or questions please leave a comment.

Filed Under: Wordpress Tutorials Tagged With: login logo, wordpress hack, wordpress login logo

Leave a Reply Cancel reply

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

Services

[wp_cycle]

Recent Posts

  • What It takes to get to #1 in Google
  • Private Blog Network Building Service in 2016 – Is It Still Worth The Risk?
  • UpThemes Scale Back On Theme Options Within Their WordPress Themes
  • Create A WordPress Login Form Shortcode For Your Blog
  • WooThemes Back Online After Malicious Hack & Further DDoS Attack

Our Team

Jon Gillham

Father, Husband and mechanical engineer. Jon has the easy job he builds and tests systems that Kelley, Hmd and their teams execute!
Ahmed Ali

Ahmed is the man that makes sure everything runs smoothly. A true jack of all trades he makes sure each site is built to our high standards!

Quick Contact

Checking...

Ouch! There was a server error.
Retry »

Sending message...

Copyright © 2021 . Experts at Harnessing the Power of Expired Domains to Help You Outrank Your Competition