AP Twig Bridge is a bridge between WordPress and Twig. WordPress is a great system mainly because of its simplicity,
but it is a headache to create templates for it. PHP-mess is not good for creating templates, that’s why
there are different template engines. Twig is a new powerful template engine developed by Fabien Potencier.
It has very clear and simple syntax, inspired by Django and Jinja. So, if you ever thought of using some templating engine in WordPress, try this plugin.
For now this plugin has a limited support for WordPress API, but I’m going to develop it further.
Your Feedback Matters
Bugs to report? Feature requests? Criticism? New ideas? We want to hear from
you! Do not hesitate. Get in touch with us and share your views.
- Get an archive with the most recent version of AP Twig Bridge.
- Uncompress the
ap-twigbridgedirectory from the archive to your
- Activate the plugin in the administration panel.
- Activate AP Twig Bridge theme in the administration panel.
- What PHP version does this plugin support?
This plugin should support php > 5.3.0, but is tested only on php 5.3.8.
- How do I start creating my theme?
You can directly edit files in twigbridge theme folder (don’t forget to copy it to you
wp-content/themesdirectory). You can use functions.php to add some hooks or to load text domain.
You must have at least these files: style.css, index.php (must contain php-code to display the template, please check the example), header.php, footer.php, searchform.php.
All twig files must be in
wp-content/themes/yourthemefolder/Twig. At least
- How do I create a special template for a page?
archives.phpabout how the php-file should look like. Create a similar file with the name you want (e.g. special.php). Then
you just create a
special.html.twigfile and write all the code you need there.
- Your plugin lacks some WordPress functions. How can I add them?
Yes, I know, that I didn’t include many WordPress API function, because initially this plugin was just a proff of concept. Actually, you can add the functions you need
to APBridge_TwigExtension module yourself, but your changes will be overwritten next time you update the plugin to a new version. So, creating your own extension
will be the best way to add the functions you need. You can do it in
It must be called befor template rendering, of course. You can use
APBridge_TwigExtensionclass as an example. Also you can write to me about the functions you need,
so that I could include them in future versions.
- Is there an easy way to contact the developer of this plugin?
Of course there is. Visit ArtPrima.cz in order to find our e-mail address and other contacts.
There are no reviews for this plugin.
Contributors & Developers
“AP Twig Bridge” is open source software. The following people have contributed to this plugin.Contributors
- Initial release.