<?php
global $paged;
if (!isset($paged) || !$paged){
    $paged = 1;
}

$templates = array( 'index.twig' );
$context = Timber::context();

$context['search_query'] = get_search_query();
$context['search_title'] = get_search_query();
$context['posts'] = new Timber\PostQuery();
$context['pagination'] = Timber::get_pagination();
  
Timber::render( $templates, $context );
