WordPress Template Engine?

I’m in a need to convert an existent design into wordpress and before starting I was curious to know: Is it correct to use pure “naked” PHP when adding logic to templates in wordpress? WordPress uses no template engine like Twig or Blade by default? I’m pretty suprised, so before starting to work on that project and doing everything in pure PHP (with the opening <?php and closing hassle ?>) I wanted to ask here. This way of doing things seems very outdated to me.

3 Answers
3

Correct, there is no PHP templating engine built into WordPress. This does however give you the flexibility to use a templating engine such as Twig or Blade (and I have worked on sites using each of those), or even completely headless using the REST API.

Leave a Comment