-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How use wordpress and php function in twig? #176
Comments
You should google the Timber Framework |
but i need herbert framework, is not any way? |
You use both, Timber is an addon for twig specifically for Wordpress |
id use "composer require timber/timber". but what i do next? |
After that create a 'views' folder inside your app folder. then you render using this code: use Timber\Timber;
...
$context = Timber::get_context();
$context['VARIABLE_TO_ASSIGN_TO_TWIG'] = "foo";
Timber::render("path/to/template.twig", $context); |
You can also use Twig's |
Hi.
How use wordpress and php functions in twig template.
Thanks for your best framework.
The text was updated successfully, but these errors were encountered: