Customizing WordPress Login Logo and Links
Article from "Learn to Make Websites Forum"
- Open the website backend, and under the "Appearance" section, locate the template function file
functions.php
; - Click to open the
functions.php
file, and insert the following code below the first<?php
tag:
Modify the Default Login Page's LOGO Image
// Custom login page logo
function custom_loginlogo() {
echo '<style type="text/css">
h1 a {background-image: url('.get_bloginfo('template_directory').'/images/login_logo.png) !important; }
</style>';
}
add_action('login_head', 'custom_loginlogo');
Change the Default Login Page's LOGO Link to Your Website's Address;
// Custom logo link
function custom_loginlogo_url($url) {
return 'https://www.xuewangzhan.net/'; // Enter the URL you want to link to here
}
add_filter( 'login_headerurl', 'custom_loginlogo_url');
function custom_register_url($url) {
return 'https://www.xuewangzhan.net/'; // Enter the URL you want to link to here
}
add_filter( 'login_registerurl', 'custom_register_url');
- In the
images
folder of your theme directory, upload an image you like namedlogin_logo.png
. This will easily replace the login icon of your website backend.
2022 Update
The webmaster has discontinued the above method and now uses the WPS Hide Login
plugin to address backend brute force attacks.
Comments are disabled.