Modern WordPress Theme Development with Timber

WordPress is often thought of as just blogging tool, and for good reason. An entire economy exists of plugins and themes to make WordPress easier to use for non-technical people who want a quick website. This has given WordPress an appearance of not being a tool for serious developers.

However, this is not true. With the right practices and tools, WordPress is capable of powering complex web applications.

What is “Modern WordPress Theme Development”?

  1. A front-end build system to compile and minimize CSS and Javascript
  2. A system for modeling and retrieving data
  3. A template system for building page templates in a modular fashion

NPM and Gulp: The Build System

The process of building a website has become far more sophisticated over the years. The scope of what makes a quality business websites has grown to adopt to increases in the types devices, content and key features demanded by users. Today’s websites are true applications which commonly depend on frameworks, libraries, and components internally developed and from other vendors.

Package management tools and task runners have been developed to allow you to take repetitive build tasks and automate them. Modern build system for your WordPress stylesheets and Javascript sources can be managed using:

  • Node / NPM for tooling and build system package management
  • Sass for modular web design and stylesheet development
  • Gulp / Webpack / Parcel for managing the build process

The Data Modeling System

The undisputed champion of WordPress data modeling is the Advanced Custom Fields (ACF) plugin by Elliot Condon. The ability to quickly customize data entry based on post types, page templates, or in the site settings allows WordPress to be used as a base for custom application development, not just content management.

Timber includes hooks for ACF that can pull custom data into page templates and shortcodes.

The Page Template System

A major complaint against WordPress is that the mixture of PHP and HTML inside its “template” system leads to non-reusable code that becomes hard to maintain. Modern web development encourages a component-first approach where code reuse is encouraged to limit errors and development time.

Timber is a plugin to write WordPress themes with object-oriented code and the Twig Template Engine. This gives developers the ability to separate data logic from view logic using a popular template syntax that’s used in many other web projects. For more, check out the Timber Starter Theme for more information.

Timber Starter Themes

Get started with building your next WordPress theme by visiting