How (and why) to use on your WordPress website

Search engines have a big problem. There is so much data out there and it’s hard to work out what is what. Humans are great at inferring the context of web content, but this is much more difficult for Google, Bing, Yahoo!, etc.. That’s why the biggest search engines have come together to create a […]

Tags: , , , ,

How to test your WordPress website performance

Website speed matters. Nobody likes browsing a slow website. If your site is slow, your visitors are more likely to leave and go to a competitor’s website. It’s not just your users who like speedy websites, Google does too. Today I recorded a video showing you two ways to test your website performance. Both methods […]

Add links to WordPress custom excerpts

By default custom excerpts don’t have a ‘read more’ link of any kind. I wanted my custom excerpts to look the same as my dynamically generated ones. It’s a simple code change:

Tags: ,

Using variables with WordPress translation functions

Today I wanted to be able to pass a custom field variable to the WordPress localization (l10n) functions. The custom field is a select field, so all the possible outputs are known. WordPress uses PO and MO files for translations. These are generated by scanning the site for __() and _e() functions, with a programme […]

Setting up domains on WP Engine

Add domains to install Log in to Click on the install name Click on ‘Domains’ Click ‘Add domain’ Add the non-www version of the domain Click ‘Add domain’ Add the www version of the domain Change DNS at registrar Log in to Click on the install name Note the IP Address and CNAME […]

Tags: , , ,

Full screen background images

I’m putting this here for my own sanity. If I had £1 for every time I’ve tried to solve this issue! The goal here is to have a background image that covers the whole of the browser window. Ideally we want it to scale, stay centred, and keep it’s correct proportions. My go-to article on […]

Tags: ,

IE Compatibility view issues

I’ve run into issues a few times recently with Internet Explorer’s ‘Compatibility view’. Some of my standards compliant web pages were being broken by having this view enabled. I found a solution via this stackoverflow page. If you add the following to your <head> it will force IE to disable compatibility view: <meta http-equiv=”X-UA-Compatible” content=”IE=edge” […]

Passing variables to get_template_part() in WordPress

This morning I needed to pass a variable to a file that I was including using the WordPress get_template_part function. I was fiddling around with global variables when I thought there must be a better way. There is. Locate and include You can use the WordPress locate_template function within PHP’s include(). It’s done like this: include(locate_template(‘your-template-name.php’)); […]

The PHP ternary operator

In my quest to master PHP, I’m going to start investigating some of the bits I’m unfamiliar with, and blogging about them. This morning, I was reading through the excellent “Professional WordPress Plugin Development” by Brad Williams, Ozh Richards and Justin Tadlock (I’ve made a resolution to read a bit every couple of days). In […]


Custom Post Types

Last night I gave a presentation at the WordPress London meetup. I talked about custom post types in WordPress, something that has really excited me since WordPress 3. I’ve included the video, a rough transcript of the presentation and the slides at the bottom. What we’ll cover What are custom post types When to use […]

Tags: , , ,

Proper float clearing

I was browsing through Forrst recently and happened across the following advice on float clearing. An easy way to properly clear floats without extra markup. If you’re not using some sort of clearfix you probably should be. .clearself:before, .clearself:after { content: ” “; display: block; height: 0; overflow: hidden; } .clearself:after {clear: both;} .clearself {zoom: […]


HTML Fractions

I wanted to use some pretty fractions in an article today. I don’t like the look of “1 1/2”, not very elegant. Of course, the answer lies within HTML special characters. There are a few ways to achieve the same thing: &frac14; will give you ¼. You can change the ‘1’ and ‘4’ to any other number. […]

Tags: ,