How to change the WordPress Login image and URL

Screen Shot 2013-09-06 at 15.54.53There’s a great little plugin called Add Logo to Admin by c.bavota which does a great job at letting you add your own logo to the WordPress login screen, and even to the top of your dashboard. But it’s another plugin.

If you’re building a theme for a client and simply want to replace the generic WordPress image, you can do that with just a few lines of code. Place them in your theme’s functions.php file:

//Change the generic login image
function custom_login_logo() {
  echo '';
}
add_action('login_head', 'custom_login_logo');

Discovered in Jo Lowery’s excellent course Dreamweaver and WordPress Core Concepts at Lynda.com.

Read more

How to use jQuery in WordPress

On a standalone (non-WordPress) project you’d import the jQuery library in the head tag, then call a jQuery function towards the bottom of your file. This approach isn’t working in WordPress. Since jQuery and many other useful libraries are already part of WordPress, there’s no need to link to your own copy. Instead, you need … Read more

How to detect screen width in CSS

CSS-LogoHave you ever wondered how a website can look great on your desktop and appear reformatted on your phone? The secret sauce is done via CSS Media Queries.

In a nutshell you define your styles for larger screens, and then override those styles with more mobile friendly options if the screen is smaller. You can specify the exact width which allows even to detect if someone is holding their device portrait or landscape.

Let’s look at how this can be accomplished with CSS rules.

Read more

How to disable update notifications in WordPress

wordpress_iconsSometimes “new” doesn’t always mean “better” or “suitable”.

Sometimes we require older versions of plugins and I’d rather WordPress would not tell me that there’s a newer version available. After all, I might accidentally update a plugin – or perhaps my clients do, breaking the site or overwriting customisations.

Let’s take a look at how we can disable those notifications, both for single plugins and for the entire site.

Read more