-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
29 lines (22 loc) · 724 Bytes
/
Copy pathindex.php
File metadata and controls
29 lines (22 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
get_header();
if ( ! post_password_required() ) {
$context = array();
$args = array(
'post_type' => 'post',
'category_name' => 'mittagstisch'
);
$context = Timber::get_context();
$context["template"] = get_page_template_slug($post->ID);
$context["post"] = new TimberPost($post->ID);
$context["beitrag"] = Timber::get_posts($args);
Timber::render("page.html.twig", $context);
}else if ( post_password_required() ){
$context = array();
$context = Timber::get_context();
$context["template"] = get_page_template_slug($post->ID);
$context["post"] = new TimberPost($post->ID);
$context["post"]->content = get_the_password_form();
Timber::render("page.html.twig", $context);
}
get_footer();