{"id":1097,"date":"2017-04-21T15:12:10","date_gmt":"2017-04-21T15:12:10","guid":{"rendered":"http:\/\/2017.bristol.wordcamp.org\/?post_type=wcb_session&#038;p=1097"},"modified":"2017-05-09T11:27:09","modified_gmt":"2017-05-09T11:27:09","slug":"get-twig-use-twig-smile","status":"publish","type":"wcb_session","link":"https:\/\/bristol.wordcamp.org\/2017\/session\/get-twig-use-twig-smile\/","title":{"rendered":"Get Twig, use Twig, smile"},"content":{"rendered":"<div>WordPress theming is great but with Twig it can be more fun. Twig is a PHP template engine thats incredibly fun to use. With Twig you write your HTML separate from your PHP files, this separation means you can bypass the_loop entirely.<\/div>\n<div><\/div>\n<div>Twig templates are reusable HTML fragments which can be used multiple times in your theme. You could even create a style guide that directly uses the same Twig templates as your theme meaning any updates to your themes HTML updates your style guide as well.<\/div>\n<div><\/div>\n<div>This talk will cover the benefits of using Twig when theming, explain how to get started and provide some working examples for you to try on your own.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>WordPress theming is great but with Twig it can be more fun. Twig is a PHP template engine thats incredibly fun to use. With Twig you write your HTML separate from your PHP files, this separation means you can bypass the_loop entirely. Twig templates are reusable HTML fragments which can be used multiple times in &hellip; <a href=\"https:\/\/bristol.wordcamp.org\/2017\/session\/get-twig-use-twig-smile\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Get Twig, use Twig, smile<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":14971491,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1494771300,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[1000],"footnotes":""},"session_track":[13412],"session_category":[],"class_list":["post-1097","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-track-2"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7VvK6-hH","session_date_time":{"date":"May 14, 2017","time":"2:15 pm"},"session_speakers":[{"id":"1000","slug":"carl-hughes","name":"Carl Hughes","link":"https:\/\/bristol.wordcamp.org\/2017\/speaker\/carl-hughes\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/1097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":2,"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/1097\/revisions"}],"predecessor-version":[{"id":1233,"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/1097\/revisions\/1233"}],"speakers":[{"embeddable":true,"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wp\/v2\/speakers\/1000"}],"author":[{"embeddable":true,"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wporg\/v1\/users\/codekipple"}],"wp:attachment":[{"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wp\/v2\/media?parent=1097"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_track?post=1097"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/bristol.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_category?post=1097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}