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.
Node / NPM for tooling and build system package management Sass for modular web design and stylesheet development Gulp 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.
Get started The Bootsmooth Project is a collection of starter kit for theme development that includes view templating, modularity, and a build process for compiling and minimizing stylesheets and scripts.
Get started with building your next WordPress theme by visiting Bootsmooth.com.