timber / starter-theme

The "_s" for Timber: a dead-simple theme that you can build anything from
MIT License
823 stars 278 forks source link
php timber twig wordpress-theme

The Timber Starter Theme

Build Status Packagist Version

The "_s" for Timber: a dead-simple theme that you can build from. The primary purpose of this theme is to provide a file structure rather than a framework for markup or styles. Configure your SASS files, scripts, and task runners however you would like!

Installing the theme

Follow the guide on how to Install Timber using the Starter Theme.

Then,

  1. Rename the theme folder to something that makes sense for your website. You could keep the name timber-starter-theme but the point of a starter theme is to make it your own!
  2. Activate the theme in the WordPress Dashboard under Appearance → Themes.
  3. Do your thing! And read the docs.

The StarterSite class

In functions.php, we call new StarterSite();. The StarterSite class sits in the src folder. You can update this class to add functionality to your theme. This approach is just one example for how you could do it.

The src folder would be the right place to put your classes that extend Timber’s functionality.

Small tip: You can make use of Composer’s autoloading functionality to automatically load your PHP classes when they are requested instead of requiring one by one in functions.php.

What else is there?

Other Resources