Quick Wordpress Custom Admin

Though it’s well documented and discussed, I thought I’d put my hat in the ring for quick and easy WordPress admin customization.

First, let’s add your favicon and a custom css file to your admin views. Add this in your functions.php theme file:

function extra_admin_css() {
    echo '<link media="all" type="text/css" href="'.get_bloginfo('template_directory').'/admin.css" rel="stylesheet" />';
    echo '<link rel="icon" type="image/vnd.microsoft.icon" href="http://{path_to_icon}">';
}
add_action('admin_head', 'extra_admin_css');
add_action('login_head', 'extra_admin_css');

Be sure to create an ‘admin.css’ file in your template directory and change {path_to_icon} to the address where your favicon exists.

Any styles you want to update in your admin/login panel can now be easily added your admin.css file.

Now, change out the WordPress logo for your own logo. Open your new admin.css file and add:

#login h1 a{
    width: {logo width here};
    height: {logo height here};
    background: url({path_to_logo}) no-repeat center center !important;
}

Want to change the logo at the top of admin panel?

#header-logo {
    background: url({path_to_logo}) no-repeat center center !important;
}

Switch out {path_to_logo} with the path to your logo file.

Now we need to update the logo hover ‘Powered by WordPress’ to say something more meaningful to your site. Back to functions.php:

function login_title(){
    return 'Ancient Wisdom Productions';
}
add_filter('login_headertitle', 'login_title');

Want to change the link destination on that image from WordPress.org to your website?

function login_url(){
    return 'http://awpny.com';
}
add_filter('login_headerurl', 'login_url');

These are typically a few of the first things I do when working on a new WordPress site. It allows for quick and easy updating of the WordPress admin panel.

In: CodeResources

Spread the Word:
  • Facebook
  • Twitter
  • Slashdot
  • Digg
  • Google Bookmarks
  • NewsVine
  • StumbleUpon
  • RSS
No comments »

Leave a Comment

Your email address will not be published.

For your safety, comments are moderated before appearing on this page.

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>