add tab options

This commit is contained in:
2020-05-26 13:11:13 +02:00
parent 75fdf97b01
commit bf03d86d95
5 changed files with 171 additions and 76 deletions
+10 -4
View File
@@ -2,9 +2,15 @@
/**
* template name: Accueil
*/
use Timber\Post;
use Timber\Timber;
$context = Timber::context();
$context = Timber::get_context();
$post = new Post();
$context['post'] = $post;
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'accueil.twig' ), $context );
$args = 'post_type=post&numberposts=3&orderby=date';
$context['posts'] = Timber::get_posts( $args );
Timber::render(['accueil.twig'], $context);