archive.php 452 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * template name: archive
  4. */
  5. $context = Timber::context();
  6. $context['term_page'] = new Timber\Term();
  7. $today = date('Y-m-d H:i:s');
  8. $args = array(
  9. 'post_type' => 'post',
  10. 'post_status'=>'publish',
  11. 'orderby' => 'meta_value',
  12. 'meta_key' => 'informations_debut_event',
  13. 'order' => 'DESC',
  14. );
  15. $context['post'] = Timber::get_post();
  16. $context['posts'] = Timber::get_posts( $args );
  17. Timber::render('archive.twig', $context );