I want to get and set the value of an ACF field into a variable in my home.php file and then use this as part of a query. So, for example, if a user enters the word ‘event’ in the the field ‘cat_name’ in the CMS, I wanted to get and set this as a variable and then use this
Tag: timber
Add custom shuffle filter to Timber/Twig
I want to shuffle an array and added following filter to my functions.php However, following code returns nothing: Answer Following the comment from DarkBee, I got it working with the following code:
How do I display 3 recent posts in footer with Timber?
So, I am beating my head over this for 2 days now. How do I display 3 recent posts in footer using Timber and Twig? I am using a starter theme from Timber. What I did inside my footer.php file: And inside my footer.twig I tried displaying them: Now the problem is it displays nothing. If I replace featured with
timber/twig how to pass `posts` php-object to JavaScript? Some values are lost
When I’m trying to pass the information contained in {{posts}} I cannot retrieve all of it, at least not the post.link information {% for post in posts %} var t = JSON….