How To Change Login Logo URL In WordPress?

WordPress, being as CMS, creates you with the login page by default to login to your site, in order to manage out your site as you need. However, it will by default, add its own logo with its own url, in the login form when you view the login page for your site, ie, http://yoursite.com/wp-login.php by default. So, what about if you want to change it as you like/need for your site? Is it really doable? Well, it is doable and here we will describe about how to change login logo url in WordPress.

How to view WordPress login page for your site?

Well, you may already know about how to view the login page for your site built within WordPress, right? If not then, you can view it via: http://yoursite.com/wp-login.php. However, it can be changed to any other url for better security of your site using the plugin for same available via the WordPress plugin directory.

Also, by default, the WordPress login page will look like the below screenshot as you may know already.

When do you need to change the WordPress default login logo image url?

Well, in some of the cases, you may create a site for your client, right? And on that site, they may also want to add their own url for login image to their login form too, right, since WordPress adds the url: https://wordpress.org by default? Well, on this case, you will need to change WordPress default logo image url to reflect their site branding/url.

Also, in some case, if they does not say the same too but, they are creating some of the social sites or eCommerce site then, most probably, you need to change the logo url to match their branding, since it is their brand service and they probably do not want to link to WordPress site at all, which may make the site as false positives.

Now, after knowing why to change the WordPress login logo image url, now, let’s move ahead to learn about how to change login logo url in WordPress.

How to change login logo url in WordPress?

In order to change, ie, customize your site, you need to edit the functions.php file of the theme. So, let’s move ahead and change login logo url for your site by pasting the below PHP code in the functions.php file of the theme:

Since, WordPress uses the filter of login_headerurl to return the logo image url for the login page, hence, above we have added the filter in that hook. So, after we have added the filter hook, the function now returns the homepage url for your site, as we have described above inside the created function. Now, after that, the login logo url will point to the home page of your site.

However, if you want to point it to any other url for same then, you can try the below PHP code instead for same:

Also, what about the title shown when hovered over the logo image in login page? Well, we have got you covered up too in this case. For that, you can paste the below PHP code in the same file mentioned, ie, functions.php file of the theme:

Hence now, you may have got idea about how to change login logo url in WordPress for your site. Now, let’s see the output of the how to change login logo url in WordPress, shall we?

Output of the change login logo url in WordPress

Now, if you have added the mentioned code above in the required file, ie, functions.php of the theme, then, you will probably see the output of that as the screenshot below:

Here, in the above screenshot, you can find the difference between each before and after applying the filter. Also, to properly know it, in the image, we have shown you with the before and after applying the filter and marked the changes too. Now, from that, you can clearly see the changes seen in there after you apply the same.

You may also want to read:

  1. Tutorial On Creating WordPress Child Theme
  2. How To Create Meta Box In WordPress
  3. Recover Forgotten Password From Local WordPress Install
  4. How To Create Shortcode With Attributes In WordPress?
  5. How To Change Login Logo In WordPress?

Conclusion

If you have followed up the tutorial properly and now can change login logo url in WordPress with ease then, we can say that you are now more familiar on this than before. However, if you are still confused on the same and want to know more about it then, do drop the comment below in the comment box and we will follow it up.

Post navigation

Bishal Napit

Bishal Napit is a WordPress theme developer from Tansen, Palpa, with a passion to learn more on WordPress.

Leave a Reply

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