When you need editability in various common (or uncommon!) areas of a website, it can be hard to decide how to deploy this. Do you widgetize it, create a custom options page, add custom fields to a page, use custom post types – there are a-lot of different strategies!

When we need this kind of functionality on sites that we build, we’ve tried them all! During this presentation at WordCamp Bristol 2017 I demonstrate one of the nicest ways – by using the WordPress Theme Customizer API you can deliver a great user experience, and even a live preview for the client.

  • Think ahead, know the extent and purpose of the options required and the best way to deploy these for useability – keep relevant options together, NOT in different places – be consistent.
  • Not everything needs to be editable – consider performance and don’t overwhelm your users with options.
  • Your own Customizer options are ideal for common visual ‘interface’ components.
  • Customizer delivers a rich front-end editing experience, giving context and instant visual feedback compared to admin area options pages.
  • If you are developing Open Source themes for distribution on wordpress.org, theme development guidelines dictate that you deploy theme options via Customizer – do not use custom admin options pages.
  • Customizer gives you pre-built advanced options fields such as colour pickers, image uploads and other media controls – but you can also create your own!
  • Customizer live previews (no page refrsh) can be easily enabled with a-little light Javascript.
  • Always escape output, never reply on valid data input.

Creating efficient WordPress websites with bespoke controls

The DRY principle (Don’t Repeat Yourself) is something very familiar to seasoned web developers – create portable code that is easy to edit, instead of scattering around repeated code is an important principle. However, it’s not just a principle that’s important to coders – we apply the very same principle to the way we organise content and controls for our bespoke WordPress websites.

We develop high performance, bespoke WordPress websites that are easy for clients to update – and we achieve this by developing our own custom content controls so clients know exactly where to go to edit content, or even the look and feel of overall visual components.

It requires in-depth knowledge of WordPress and deep initial planning to really achieve this level of ease of use for clients – and it’s something we are very proud of.

Useful Links from presentation

Here is some example code that I demonstrated to get you started, along with a link to the official WordPress Theme Developers handbook on this subject.

Customizer.js presentation example code
Customizer.php example code from presentation
WordPress Theme Developers handbook Customizer API