PHPackages                             dsawardekar/wordpress-twig-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. dsawardekar/wordpress-twig-helper

ActiveLibrary[Templating &amp; Views](/categories/templating)

dsawardekar/wordpress-twig-helper
=================================

Helpers for using Twig with WordPress

0.2.0(12y ago)02351MITPHP

Since Apr 24Pushed 11y ago1 watchersCompare

[ Source](https://github.com/dsawardekar/wordpress-twig-helper)[ Packagist](https://packagist.org/packages/dsawardekar/wordpress-twig-helper)[ Docs](http://github.com/dsawardekar/wordpress-twig-helper)[ RSS](/packages/dsawardekar-wordpress-twig-helper/feed)WikiDiscussions develop Synced yesterday

READMEChangelogDependencies (2)Versions (7)Used By (1)

WordPress Twig Helper [![Build Status](https://camo.githubusercontent.com/64f82015481829522ed54db7f8765aeb70146ce5f4d3496014623206672be4f2/68747470733a2f2f7472617669732d63692e6f72672f64736177617264656b61722f776f726470726573732d747769672d68656c7065722e706e67)](https://camo.githubusercontent.com/64f82015481829522ed54db7f8765aeb70146ce5f4d3496014623206672be4f2/68747470733a2f2f7472617669732d63692e6f72672f64736177617264656b61722f776f726470726573732d747769672d68656c7065722e706e67) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/7ec206cc315cc7d06fc08b749dce29b3daf30f374f2b3b5856e5bb4bcc74a40a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64736177617264656b61722f776f726470726573732d747769672d68656c7065722f6261646765732f7175616c6974792d73636f72652e706e673f733d30323934316230393235613462613465633264396331656663666133653438386535366437633463)](https://scrutinizer-ci.com/g/dsawardekar/wordpress-twig-helper/)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#wordpress-twig-helper--)

A tiny Library for using [Twig](http://twig.sensiolabs.org/) Templates in WordPress Plugins &amp; Themes.

Deprecated. This repo has been merged into [Arrow](https://github.com/dsawardekar/arrow).

Usage
=====

[](#usage)

The `WpTwigHelper\TwigHelper` is a helper class that provides the bulk of the functionality.

First give the `TwigHelper` a base directory. This will usually correspond to your plugin or theme directory. It must contain a `templates` sub directory that contains the `.twig` templates.

```
