search.php 436 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * Search results page
  4. *
  5. * Methods for TimberHelper can be found in the /lib sub-directory
  6. *
  7. * @package WordPress
  8. * @subpackage Timber
  9. * @since Timber 0.1
  10. */
  11. $templates = array( 'search.twig', 'archive.twig', 'index.twig' );
  12. $context = Timber::context();
  13. $context['title'] = 'Search results for ' . get_search_query();
  14. $context['posts'] = new Timber\PostQuery();
  15. Timber::render( $templates, $context );