WordPress customisation

WordPress is everywhere. It powers 75 million websites globally; that’s 30% of all sites, an impressive statistic. It got there by being easy to use and by being able to deliver good results. Its biggest strength – beyond the fact that it’s free – is probably that you don’t have to be a programmer to use it, allowing anyone with an idea for a website to produce a polished, reliable product with little more than a few mouse clicks.

There is a minor downside to this, however, that it’s fairly easy to spot a WordPress website as so many of them use the same themes. Even though hundreds or even thousands of free themes are available for download, many sites end up looking rather similar. Even when they’re visually different there’s something familiar about the overall ‘look and feel’. Most of the time this doesn’t matter; what’s important to the site owner is having their site running quickly and with the minimum of effort. And familiarity is a good thing in that users make fewer mistakes and have no trouble finding what they are looking for.

For many businesses, though, having a distinctive product is important. This can mean many things but often involves some form of customisation of the theme or the addition of plugins to provide special features. Businesses also tend to have special needs that may not be offered as standard by the chosen theme.

It’s quite straightforward to modify a theme, but you need a PHP programmer with good knowledge of the way WordPress works and how to make it do what you need. It’s best to leave this as the last resort, partly because it’s time-consuming (i.e. expensive) and partly because once a theme is modified, updates may break it.

Plugins enhance the functionality of a website without any need to modify core components or the theme. There are thousands to choose from, though not all are blessed with good-quality documentation. Even when you find one that looks suitable and you’ve figured how to use it, you often discover it doesn’t completely match your needs, so finding and implementing the right plugin can also be time-consuming even for an expert.

Server and client

Customisation of WordPress takes place on the server and/or in the client. The theme is server code; its job is to build the pages that go to the browser. Some of this is the text and images you add when building your pages and posts; other parts are things added by the theme itself.

You can also have client-side processing; code that runs in the browser to do things mostly if not completely without the knowledge of the server. The code is provided by the server but without any understanding of what it’s for; it just transfers what you put in the editor.

Plugins can provide code to modify the way the server works, or to add browser code, or even both.

Client-side processing

Programs that run in the browser are usually written in JavaScript, a powerful and complex language, but the great majority of WordPress websites are built by people with no JavaScript experience, nor any desire to learn how to program in the language. Many things can be done in the browser that by not involving the server result in a better, more responsive website, and a huge ecosystem of plugins has grown up to make it possible for anyone to do these things, whether they are novices or experts.

There are several categories of client-side customisation. Here are just three:

  1. CSS styles. CSS controls the appearance of your pages; the font face size and weight, for example, also line spacing, borders, background colours and images and so on. JavaScript can make changes to your CSS on the fly and in response to user action, to change colours, reveal hidden popups and much more.
  2. Interactivity. When users interact with a feature of a page, such as by clicking a button, the normal action is for the page to call for a new page from the server. Themes can add JavaScript code that overrides this behaviour and you can add JavaScript code yourself to do this too. An example is to hide and show sections of the page so the user sees new content instantly, without the need to reload the page.
  3. REST. This is a technique whereby your page makes a call to its own server or to a remote one and retrieves data that it then displays according to rules also coded in JavaScript. An example might be to get the current value of a quoted stock.

As I said above, you may find a plugin that does just what you need, but there are inevitably some needs that aren’t covered by any known plugin (or you may simply be unable to locate one). In such cases you will need some JavaScript code to be written and included in your page. Many businesses offer such a service.

Because JavaScript is a complex language it is likely that the customer may find it hard to follow the JavaScript code written by an expert. This may be undesirable since the customer is then unable to validate the quality of the code or to make further changes without more expense.

To help here I offer EasyCoder, an English-like scripting language written in JavaScript, that enables a large number of the typical actions required by browsers to be coded more simply than by using JavaScript itself. EasyCoder scripts are added directly to a web page and can perform many of the actions in the list above. They are generally much easier to read by non-programmers and modifications can be made and tested immediately. EasyCoder is a free WordPress plugin and it has its own website; EasyCoder Software, with examples of the kinds of things it can do.

Where the needs of a particular enhancement are beyond the capability of EasyCoder I am able to offer a JavaScript programming service, and also to handle PHP code for use in plugins. Please contact me for further information.