From d77cca597f2408e6672d3becbae99d90e0b2e090 Mon Sep 17 00:00:00 2001 From: Jules Date: Fri, 8 Mar 2024 18:22:19 -0800 Subject: [PATCH] #61 adds page template to page.php --- page.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/page.php b/page.php index 430feac80..d6ffb3de3 100755 --- a/page.php +++ b/page.php @@ -28,6 +28,13 @@ $timber_post = new Timber\Post(); $context['post'] = $timber_post; +// Add page slug based template lookup. +array_unshift( + $templates, + 'templates/pages/page-' . $timber_post->post_name + . '.twig' +); + // Check if this is the style guide page. if ( 'style-guide' === $timber_post->post_name ) { $acf_block_types = acf_get_store( 'block-types' );