How to Make WordPress Easier for Clients, Part 1: Custom Branding

Contributing Editor

WordPress is one of the web’s most popular Content Management Systems. The appeal is obvious: it’s flexible, it’s easy to create custom templates, it offers a huge quantity of plugins, hundreds of themes are available, the application is open source and it’s free. It’s also relatively simple for clients to understand — that’s one of the main reasons I use it.I recently posted the article Do Your Clients Use Their CMS? I concluded that many CMSs can be daunting, appear technical, use jargon, or offer too many superfluous options. WordPress may be one of easier systems but it could be simplified further. Fortunately, we can address many issues with a little PHP magic.Easier WordPressIn this series of articles we’ll implement several options to make WordPress easier for your clients. You can probably find plugins to achieve the same thing, but this code is easy, flexible, and won’t need to be updated (unless you want to make updates yourself).

functions.php

The following WordPress modifications change your theme’s functions.php file. This file is optional and it’s automatically loaded when you view an administration page or the website itself. The file is normally used to define regularly-used template functions, but it can also implement plugin-like behavior.Since functions.php is activated with your theme, it’s easy to distribute between WordPress installations without having to download, enable or update plugins. If your current theme does not contain a functions.php file, simply create one and add PHP delimiters:

<?php// code will go here?>
tip: PHP delimiters

The closing “?>” isn’t strictly necessary and many PHP developers will tell you that it shouldn’t be used — but that’s a topic for another article!

Changing the WordPress login logo

There’s nothing wrong with the WordPress logo, but few clients will care what CMS they’re using. Why not use their logo or branding?The logo file is /wp-admin/images/logo-login.gif. Although you can remove or change that file, it will reappear whenever you update WordPress. Here’s a better solution:1. Create/obtain your client’s logoIt’s best to resize the image so it’s no larger than 326 x 82 pixels. Copy the image file to your theme folder — in the following code, we’ll assume it’s named logo.png.2. Update your theme’s function.php filePlace the following code in function.php to change the default logo. Remember to modify the logo.png file reference if you named it differently.

// login page logofunction custom_login_logo() {	echo '<style type="text/css">h1 a { background: url('.get_bloginfo('template_directory').'/logo.png) 50% 50% no-repeat !important; }</style>';}add_action('login_head', 'custom_login_logo');

Removing WordPress update notifications

The WordPress administration panels inform you when a new version is available. Unfortunately, it tells everyone — including your clients. That could lead to unnecessary concern or persuade them contact you every half an hour until the update is applied.Add the following code to your theme’s functions.php file to disable the update notification for everyone except WordPress administrators:

// remove upgrade notificationfunction no_update_notification() {	remove_action('admin_notices', 'update_nag', 3);}if (!current_user_can('edit_users')) add_action('admin_notices', 'no_update_notification', 1);

I hope you found those two examples useful. Further WordPress simplification ideas are available now…

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • http://www.chrisranjana.com chrisranjana

    Also since the update notifications have been disabled Atleast once in a month we need to check manually for important security updates and update wordpress.

  • chillybin

    Great tips, will be rolling these out shortly!

  • josebb

    So timely! I am currently working on a custom WordPress installation. Thanks Craig, looking forward to more useful tips!

  • http://www.isquaretechnologies.com SSJ

    Yeah nice tips for custom branding of wordpress but still needs to take care of security updates manually…

  • http://www.jakub.chodorowicz.pl/ chodorowicz

    helpful post – I didn’t know that these modifications are so easy, thanks

  • http://htmlblox.com samanime

    @chrisranjana They aren’t disabled for everyone, only those who aren’t administrators. It still appears normally for those that are administrators, so all you have to do is log into their CMS and check.

  • http://www.billbolte.com bbolte

    That’s great info. I’ve been digging into WP more and more but hadn’t come across this before. Wish I had seen this a couple of weeks ago. Thanks.

  • http://brianswebdesign.com skunkbad

    Hey, very cool! More like this please!

  • eashkhatri

    Use http://www.eashkhatri.com to get your IP Address and to encode/decode by using base64 algorithm

  • PixelCrayons

    WordPress is widely used CMS. It can also be used for branding activity. Changing login logo would helpful in doing branding of client. Well great Info I must say . Our team of designers and developers will sure take this into consideration. Thanks for sharing.

  • http://www.optimalworks.net/ Craig Buckler

    @SSJ
    If it were possible to automate WP updates without user intervention, I wouldn’t recommend using the facility. It could trash your website and you’d never know until you next visited.

    I’d always recommend testing a WP update before it goes live. It’s usually fine, but I have experienced minor template breakages. Once you’re happy, you can update the live site — it only takes a couple of clicks.

    Your client’s don’t need to know about this process. That’s why you can remove the update notification for them.

  • Simon Roberts

    I am confused.

    Why don’t you have a custom stylesheet rather than have to write php code to inject the style into the page?

  • http://www.optimalworks.net/ Craig Buckler

    @Simon Roberts
    You can change the WordPress control panel HTML to link to a new stylesheet or change the CSS files. However, those changes would be lost whenever you did a WordPress upgrade.

    This solution inserts a little CSS into the login page using WordPress’s PHP plugin architecture.

  • http://www.virvo.com Web-Development

    I dont really think its a good idea to suppress upgrade message – sometimes upgrades are security patches which need to be applied ASAP – suppressing it could be asking for trouble.

  • Ravedesigns

    Nice tips – thanks, and there are plugins like “My Brand Login” http://krisjaydesigns.com/?p=351 that’ll help w/this too.

  • http://www.optimalworks.net/ Craig Buckler

    I dont really think its a good idea to suppress upgrade message

    Administrators still see the message. It’s only suppressed for users with lower privileges … those who can’t run the upgrade and probably don’t care too much either.

  • http://01-global.net 01globalnet

    I would not suggest “branding” an open source system.

    Credits would be given to the creators :) Although you may keep source code and license, the client will never look at source code :) or click that footer link :)

    Well, I would PREFER (and I DO it) to tell a client that I will build a site for them that uses WordPress, Oscommerce, Joomla, Elxis etc…. platforms that are used and trusted by thousands (or millions) users out there…. And you know some of these apps are used by Google and other top 10/100/…. companies…

    If they want something custom… no problem, more work that results to more income. Right ethics and clean procedures.

  • http://www.optimalworks.net/ Craig Buckler

    @01globalnet
    Interesting point. However, open source is ‘open’. You can do what you like (within the terms of the licence).

    While some clients might have heard of WordPress, Joomla, Drupal, etc, I suspect the majority of small business owners have not. That’s certainly my experience. In fact, I recently had a client who had been given a clean install of Joomla and couldn’t understand it. His impression was overwhelmingly negative because he wasn’t a developer.

    Simplifying the system and adding small tweaks (such as login logos) can help clients. It will lead to increased usage of that platform.

  • Troy Dean

    Our White Label CMS plugin does this for you and also allows you to customise the dashboard modules very easily.

    It’s free at http://www.videousermanuals.com/white-label-cms/

    Keep up the great work guys.

  • Anonymous

    i like this tip, but i wanted to know how can i completely disable wordpress updates, wordpress update notifications and plugins updates and notification…any help will be appreciated..

  • http://sunnieweb.com Sunnie

    thanks a lot for tips! not a long ago had a problem with the customer who updated WP version and many plugins and new code started to work with troubles. will use your code now, thanx again!