WordPress and Drupal are frequently compared to one another and each has its pros and cons. Drupal is getting more user friendly and WordPress is getting more powerful. Both are idiosyncratic is their own ways.
If you're entering the WordPress landscape from a Drupal orientation, sometimes maneuvering through the APIs of WordPress can be a bit of a hurdle, but there are some tools available to make switching contexts less painful (if you have to use both).
WordPress, meet Timber. Timber is a WordPress plug-in that activates a new, object-oriented wrapper for the WordPress API and a new theming layer that leverages Twig.
Twig has been around since 2009, but Drupalistas know it's a key part of the changes introduced in Drupal 8 as well. Timber's support for Twig adds some nice separation between logic and presentation layers. It also provides an elegant way to leverage Advanced Custom Fields (ACF) and makes working with images a snap.
Here are some resources to learn more about Timber and Twig:
While many folks ponder about the future of the headless CMS and frameworks galore, adoption and extension of TWIG's theming layer continues to grow in prominence. Here are some other technologies that integrate TWIG.
Technologies with Native Support for TWIG
- Symfony - symfony.com/doc/current/templating.html
- Silex - silex.sensiolabs.org
- Drupal - drupal.org
- October - octobercms.com
Technologies extended with TWIG Support
- Magento via Magento2-Twig - github.com/SchumacherFM/Magento2-Twig
- Laravel via TwigBridge - github.com/rcrowe/TwigBridge
- Java (Spring) - jtwig.org
- Node.js via NPM - npmjs.com/package/twig
If you've already mastered (or are beginning to master) Twig and need to work on Wordpress, give Timber a try. You'll be glad you climbed out on that limb. ;)