Start Theme Repo
This commit is contained in:
17
page.php
Normal file
17
page.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
use Timber\Timber;
|
||||
use RomhackPlaza\Theme\Page_Access;
|
||||
|
||||
if( Page_Access::can_access_or_change_content() ) {
|
||||
|
||||
$page = Timber::get_post();
|
||||
|
||||
$templates_list = [
|
||||
'pages/' . $page->post_name . '.twig',
|
||||
'pages/generic.twig',
|
||||
];
|
||||
|
||||
Timber::render($templates_list, Timber::context());
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user