add twig agenda

This commit is contained in:
2020-05-26 12:30:49 +02:00
parent bb8f308ff9
commit 75fdf97b01
2 changed files with 52 additions and 27 deletions
+13 -16
View File
@@ -1,19 +1,16 @@
<?php
/**
* The template for displaying Archive pages.
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* Methods for TimberHelper can be found in the /lib sub-directory
*
* @package WordPress
* @subpackage Timber
* @since Timber 0.2
*/
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
$timber_post = new Timber\Post();
$context['posts'] = new Timber\PostQuery();
$context['post'] = $timber_post;
$context = Timber::context();
$args = array(
'post_type' => 'post',
);
$context['posts'] = Timber::get_posts( $args );
Timber::render( array( 'agenda.twig' ), $context );