最近更新的页面
0043-installation-manage-timber-with-composer
title: "Managing Timber with Composer" order: "30" The following guide should help you manage the...
0042-installation-intro-to-composer
title: "A short intro to Composer" hideInMenu: true order: "20" If you’re familiar with the WordP...
Installation
You can install Timber through Composer. If you’re not familiar with Composer yet, read our short...
0040-guides-wp-cli
title: "WP-CLI" order: "1670" Timber includes its own wp timber command for WP-CLI, the WordPres...
WooCommerce
Point of entry - main WooCommerce PHP file The first step to get your WooCommerce project integra...
Widgets
In a world where the block editor is used more and more, widgets are getting less important. Howe...
Users
To get a user object in Timber, you use Timber::get_user() and pass the WordPress user ID as an ...
Twig
With Timber, you can use all the features that Twig has to offer, plus some more. In this guide, ...
Twig filters
General Filters Twig offers a variety of filters to transform text and other information into the...
Twig Blocks
Timber provides powerful functionality for rendering specific blocks from Twig templates, both fr...
Automated Testing
Setup a testing environment with PHPUnit Follow the setup steps for Varying Vagrant Vagrants. If ...
Terms
Get a term To get a term object in Timber, you use Timber::get_term() and pass the WordPress ter...
Template Locations
Timber::render('teaser.twig'); When you use Timber::render(), Timber::compile(), or Twig includ...
Sidebars
So you want a sidebar? Method 1: PHP file Let's say every page on the site has the same content g...
Shortcodes
Let’s implement a [youtube] shortcode which embeds a youtube video. For the desired usage of [y...
Routing
Timber 1.x shipped with the Upstatement/routes package for custom routes (see Routing Guide for T...
Usage
Fields are the building block of every container. New field are created using the make method F...
Time
Renders a time picker field. Field::make( 'time', 'opens_at', __( 'Opening time' ) ) Config metho...
Textarea
Multiline text input with HTML allowed. Field::make( 'textarea', 'crb_phone_numbers', __( 'Phone ...
Text
The text field is the simplest and most generic field. It renders a text input field. Field::make...