Skip to content

Commit

Permalink
#61 adds page template to page.php
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesKhong committed Mar 9, 2024
1 parent 4b68c3c commit d77cca5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down

0 comments on commit d77cca5

Please sign in to comment.