Step 1.1 Customize Login Page Logo
When a client wants to access the WordPress admin, the first thing they will notice is the login page with a WordPress logo. Wouldn’t it be better if this page had the logo of your client’s company or maybe yours?
There are many simpler ways to do this using plugins that allow other customization options too. But I personally prefer setting this using the powerful WordPress functions.php file.
If you have a functions.php in your custom theme, open it and if not, create a file named funtions.php and place it inside the theme folder.
Add below lines in the functions.php file:
// CUSTOM ADMIN LOGIN HEADER LOGO
function
my_custom_login_logo()
{
echo
''
;
}
add_action(
'login_head'
,
'my_custom_login_logo'
);
Note
The path "images/logo_admin.png" is relative to the main theme folder and needs to be changed
based on the location of your logo image.
Make sure to have additional white space in the image below the logo,
otherwise the warning message might touch the logo.
Now as you can see with just a few lines, we are able to customize the logo of the login page without the need of a plugin.
WordPress is very modular software with thousands of functions if not more.
We can hook into any function and modify the default settings through the use if a functions.php file or through plugins.
Using the above code we have simply used the hook login_head() and added our own function to it.
Similarly you can even further and add your own stylesheet to the login page.
Step 1.2 Customize Login Page Logo link & ALT text.
If you click on the logo on the login page, it will take you to www.wordpress.org.
The alt text of this link is “Powered by WordPress”.
Using the same functions.php file we can now modify the link and the alt text to anything we want.
// CUSTOM ADMIN LOGIN LOGO LINK
function
change_wp_login_url()
{
echo
bloginfo(
'url'
);
// OR ECHO YOUR OWN URL
}
add_filter(
'login_headerurl'
,
'change_wp_login_url'
);
// CUSTOM ADMIN LOGIN LOGO & ALT TEXT
function
change_wp_login_title()
{
echo
get_option(
'blogname'
);
// OR ECHO YOUR OWN ALT TEXT
}
add_filter(
'login_headertitle'
,
'change_wp_login_title'
);
In earlier example, we used add_action and in above example we used add_filter. What’s the difference?
Well both are WordPress hooks, only difference is that we used add_action for large functions and
add_filter to modify text before its sent to the database or the browser.
Step 1.3 Customize WordPress footer
In the footer of WordPress backend, you would notice this link “Thank you for creating with WordPress. • Documentation • Freedoms • Feedback • Credits”.
WordPress deserves all the credit we can ever give for making such a wonderful piece of application.
However for those of you who want to one step further and modify this we have another WordPress hook to our rescue.
// Admin footer modification
function
remove_footer_admin ()
{
echo
'
';
}
add_filter(
'admin_footer_text'
,
'remove_footer_admin'
);
You can add your own website link and name and also any other links you wish such as link to support website,
or your email address.