How to Easily Customize the WordPress Admin

February 25, 2013 / By: dev

It’s nice to have something that you can call your own. For your house, it starts with a doormat, and for your WordPress website it starts with putting a logo on your wp-admin login page.

Now I know what you might be thinking.

“Why should I care about the aesthetics of a part of the website that no one else but I will be seeing?”

Your website plays an important role in building your brand and business. So why not remind yourself of that fact when logging in?

Here at TECKpert, we do a bit of branding for our clients’ WordPress websites in the backend before launching. It gives our clients a sense of ownership and it’s a neat personal touch, like a doormat saying “Welcome.”

So without further ado, I’ll show how to accomplish this!

1. Upload logo

First off, drop your logo in the images directory of your WordPress theme (‘yourtheme/includes/images/’). It should preferably be a PNG with a width of 274 pixels and a transparent background. Name it “login-logo.png” for the sake of this example.

2. Create an admin stylesheet

Step one, make a new custom stylesheet file titled “admin.css” and drop it in the following directory: ‘yourtheme/includes/css/’

Now add the following code to your stylesheet:

#login h1 a
{
background: url('../images/login-logo.png') no-repeat scroll center top transparent;
}

3. Create filters and actions in functions.php

Once you’re done with that, copy and paste this code into your theme’s functions.php file:

/**
* Function: admin_login_url
* Description: Updates the URL for the logo on the WordPress admin login page
* */
function admin_login_url($url){
return get_bloginfo( 'url' );
}
add_filter('login_headerurl', 'admin_login_url');

/**
* Function: admin_css
* Description: Adds a custom stylesehet to be included in the login.
* */
function admin_css() {
wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/includes/css/admin.css' );
}
add_action('login_head', 'admin_css');

This function makes sure that your stylesheet is only being loaded when you are in the login screen of the site. Nothing special, just a little efficiency.

And you’re done!

Afterward, navigate to yoursite.com/wp-admin and presto, your login page is branded. Now even though your website is built on some really awesome content management software you didn’t make, it feels more like home!

For the more advanced, you can take it a step further even and quickly change the background color of the page and other elements.

Want to learn more? Get in touch with a Web Expert



 
 

Need Help?

Give us a call

786 393-5826

Talk with one of our professionals and start working with TECKpert today.

Speak with us

Over 20 national and regional awards

2012

Interactive Media Awards - Winner for TECKpert.com

Daily Business Review - Best Of Internet Marketing and Web Design

2013

Davey Awards - Silver Award - Midtown Women's Center

Davey Awards - Silver Award - MSG Law

W3 Awards - Silver Award - Leon Cosgrove

Communicator Awards - Award of Distinction - 400SunnyIsles.com

Communicator Awards - Award of Distinction - Esolist.com

Communicator Awards - Award of Distinction - CSK Mobile

2014

W3 Awards - Silver Award - CorkageFee (Mobile Application)

Communicator Awards - Award of Distinction - ERP Maestro

Communicator Awards - Award of Distinction - AADS

Communicator Awards - Award of Excellence - TECKpert

Davey Awards - Silver Award - CorkageFee (Mobile Application)

W3 Awards - Silver Award - Hubdin

2015

Daily Business Review - Best Of Internet Marketing - Ranked #3

Daily Business Review - Best Of Web Design - Ranked #3

South Florida Business Journal - Top Web Design and Development Company - Ranked #5

2016

South Florida Business Journal - Top Web Design and Development Company - Ranked #2

Daily Business Review - Best Of Internet Marketing - Ranked #2

Daily Business Review - Best Of Internet Marketing - Ranked #3

Davey Awards - Silver Award - CorkageFee (website)

2017

South Florida Business Journal - Top Web Design and Development Company - Ranked #2

Daily Business Review - Best Of Internet Marketing - Ranked #3

Daily Business Review - Best Of Web Design - Ranked #3

Davey Awards - Silver Award - Zilbert