O'Reilly logo

WordPress Web Application Development - Second Edition by Rakhitha Nimesh Ratnayake

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What is a template engine?

The template engine is a library or framework that separates logic from template files. These libraries provide their own syntaxes for passing necessary values to the template from the controllers or models. Once successfully implemented, we shouldn't have complex code inside template files other than simple if-else statements and loops.

There are plenty of open source template engines available for PHP. Smarty, Mustache, and Twig are some of the popular ones among them. However, integrating this type of template engine in WordPress is a complex task, compared to using it in other PHP frameworks. The architecture of WordPress is different from any other PHP framework as it drives on action hooks and filters. Therefore, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required