I love the idea of using Twig templates within WordPress themes!!
-
One thing which I immediately changed when I installed this plugin into my website was the location of the Twig installation since I intend to use the composer module manager.
I also modified the path of the “twigs” folder so that it is taken from the root of the website rather than the active theme folder. Agreed, this is counter-intuitive for the needs of most people, but my reasoning will be explained in a moment.
Here is the directory structure which I decided go with:
/httpdocs/blog/wp-content/plugins/twigpress/*
/httpdocs/blog/wp-content/themes/mytheme/*
/httpdocs/vendor/twig/twig/lib/Twig
/httpdocs/twigsOne of the things which I like about using Twig in this way is that it allows me to reuse the same overall site templates outside of WordPress. My website makes use of several separate systems which previously had their own separate themes/templates/skins. Twig allows me to define one master layout which each of these systems can easily share for one consistent look throughout the entire website!
Thanks!!
- The topic ‘I love the idea of using Twig templates within WordPress themes!!’ is closed to new replies.