-
Hi! I'm responsible for managing a number of websites using Timber/Twig which I wasn't involved in developing. In preparation for the PHP 8.2 upgrade, I'm attempting to shift these websites from using the plugin version 1.x to retrofitting 2.x within their themes. Most instances of Timber in a template start with this syntax
It seems that TimberPost() is not a thing in 2.x -- does anyone know what the equivalent is? I see references to this in the 2.x docs, but nothing there really resonates with the code I'm looking at, or are explicit how to update this kind of assignment for 2.x |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
use this: |
Beta Was this translation helpful? Give feedback.
use this:
$context = Timber::context(); $context['footer'] = Timber::get_post();
You can find your guidelines for this code in the 2.x docs here.