All Projects → timber → Timber

timber / Timber

Licence: mit
Create WordPress themes with beautiful OOP code and the Twig Template Engine

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Timber

Sugar
Some bonus functionality for Timber
Stars: ✭ 44 (-99.11%)
Mutual labels:  wordpress, twig, timber
Lumberjack
Lumberjack is a powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code.
Stars: ✭ 261 (-94.73%)
Mutual labels:  wordpress, twig, timber
Generator Baukasten
Awesome!
Stars: ✭ 50 (-98.99%)
Mutual labels:  wordpress, twig
Generator Kittn
The Yeoman Kittn Generator
Stars: ✭ 63 (-98.73%)
Mutual labels:  wordpress, twig
Base Camp
Awesome WordPress starter theme for developers based on modern web technologies.
Stars: ✭ 135 (-97.27%)
Mutual labels:  wordpress, timber
Wordpress Starter
📦 A starter template for WordPress websites
Stars: ✭ 26 (-99.47%)
Mutual labels:  wordpress, timber
Planet4 Master Theme
Wordpress master theme for the Greenpeace Planet 4 project
Stars: ✭ 34 (-99.31%)
Mutual labels:  wordpress, twig
Jackpine
WordPress starter theme with Timber, Tailwind, and Alpine.js.
Stars: ✭ 101 (-97.96%)
Mutual labels:  wordpress, timber
Generator Chisel
Chisel is a development framework for creating easy to maintain and fast WordPress websites
Stars: ✭ 233 (-95.29%)
Mutual labels:  wordpress, timber
branch
Branch Starter Theme - A WordPress starter theme based on Timber library and Bootstrap
Stars: ✭ 87 (-98.24%)
Mutual labels:  twig, timber
pine
pine - A CLI installer for timber
Stars: ✭ 29 (-99.41%)
Mutual labels:  twig, timber
Starter Theme
The "_s" for Timber: a dead-simple theme that you can build anything from
Stars: ✭ 679 (-86.29%)
Mutual labels:  twig, timber
Meadow
WordPress templating DSL based on Twig.
Stars: ✭ 73 (-98.53%)
Mutual labels:  wordpress, twig
Timmy
Advanced image handling for Timber.
Stars: ✭ 146 (-97.05%)
Mutual labels:  wordpress, timber
19h47.fr
🔥
Stars: ✭ 25 (-99.5%)
Mutual labels:  twig, timber
Flynt
Component based WordPress starter theme, powered by ACF Pro and Timber, optimized for a11y and fast page load results.
Stars: ✭ 363 (-92.67%)
Mutual labels:  wordpress, timber
Instant Weather
An Android weather application implemented using the MVVM pattern, Retrofit2, Dagger2, LiveData, ViewModel, Coroutines, Room, Navigation Components, Data Binding and some other libraries from the Android Jetpack.
Stars: ✭ 473 (-90.45%)
Mutual labels:  timber
A11y Style Guide
Accessibility (A11Y) Style Guide
Stars: ✭ 493 (-90.04%)
Mutual labels:  twig
Wp Cli
⚙️ WP-CLI framework
Stars: ✭ 4,474 (-9.65%)
Mutual labels:  wordpress
Wordpress Nginx Docker Compose
Run WordPress with nginx using Docker Compose.
Stars: ✭ 460 (-90.71%)
Mutual labels:  wordpress

By Jared Novack (@jarednova), Lukas Gächter (@lgaechter), Coby Tamayo (@cobytamayo), Maciej Palmowski (@palmiak_fp), Nicolas Lemoine (@nlemoine) Upstatement and hundreds of other GitHub contributors

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version WordPress Download Count WordPress Rating

Because WordPress is awesome, but the_loop isn't

Timber helps you create fully-customized WordPress themes faster with more sustainable code. With Timber, you write your HTML using the Twig Template Engine separate from your PHP files.

This cleans up your theme code so, for example, your PHP file can focus on being the data/logic, while your Twig file can focus 100% on the HTML and display.

This is what Timber's .twig files look like (from this Hello World example)

{% extends "base.twig" %}
{% block content %}
  <h1 class="big-title">{{ foo }}</h1>
  <h2 class="post-title">{{ post.title }}</h2>
  <img src="{{ post.thumbnail.src }}" />
  <div class="body">
	{{ post.content }}
  </div>
{% endblock %}

Once Timber is installed and activated in your plugins directory, it gives any WordPress theme the ability to take advantage of the power of Twig and other Timber features.

Looking for docs?


Installation

The GitHub version of Timber requires Composer and is setup for inclusion within a theme or plugin. If you'd prefer one-click installation for your site, you should use the WordPress.org version.

cd ~/wp-content/themes/my-theme
composer require timber/timber

If your theme/plugin is not setup to pull in Composer's autoload file, you will need to

/* functions.php */
require_once(__DIR__ . '/vendor/autoload.php');

After this line, initialize Timber with

$timber = new \Timber\Timber();

What Now?

Setup the Timber Starter Theme. Once you have that installed in your WordPress setup, continue reading the Getting Started guide to Themeing.


Mission Statement

Timber is a tool for developers who want to translate their HTML into high-quality WordPress themes through an intuitive, consistent and fully-accessible interface.

  • Intuitive: The API is written to be user-centric around a programmer's expectations.
  • Consistent: WordPress objects can be accessed through common polymorphic properties like slug, ID and name.
  • Accessible: No black boxes. Every effort is made so the developer has access to 100% of their HTML.

What does it look like?

Nothing. Timber is meant for you to build a theme on. Like _s it comes style-free, because you're the style expert. Instead, Timber handles the logic you need to make a kick-ass looking site.

Who is it good for?

Timber is great for any WordPress developer who cares about writing good, maintainable code. It helps teams of designers and developers working together. At Upstatement we made Timber because while our entire team needs to participate in building WordPress sites, not everyone knows the ins-and-outs of the_loop(), codex and PHP (nor should they). With Timber your best WordPress engineer can focus on building the .php files with requests from WordPress and pass the data into .twig files. Once there, designers can easily mark-up data and build out a site's look-and-feel.

Related & Official Projects

  • Twig The template language used by Timber.
  • Timber Starter Theme The "_s" of Timber to give you an easy start to the most basic theme you can build upon and customize.
  • Timber Debug Bar Adds a debug bar panel that will show you which template is in-use and the data sent to your twig file.

Related Timber Projects

Projects that use Timber

  • Branch Bootstrap 3 + Timber = Branch starter theme!
  • Flynt a component based WordPress starter theme built on Timber and ACF Pro
  • Gantry5 a framework for theme development
  • Hozokit a component based starter theme
  • Seedling a starter theme using Bootstrap 4

Helpful Links

Support

Please post on StackOverflow under the "Timber" tag. Please use GitHub issues only for specific bugs, feature requests and other types of issues.

Should I use it?

It's MIT-licensed, so please use in personal or commercial work. Just don't re-sell it. Timber is used on tens of thousands of sites (and tons more we don't know about)

Contributing & Community

We love PRs! Read the Contributor Guidelines for more info. Say hello, share your tips/work, and spread the love on Twitter at @TimberWP.

Documentation

The Official Documentation for Timber is generated from the contents of this repository:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].