/wp-admin/plugins.php'; return; } if (!class_exists('acf') ) { echo 'ACF not activated. Make sure you activate the plugin in /wp-admin/plugins.php'; return; } $context = Timber::get_context(); $context['post'] = new ForeverPost(); if (is_front_page()) { $context['posts'] = Timber::get_posts( array( 'post_type' => 'post', 'numberposts' => 3 ) ); $template = array('home.twig'); } else if (is_page()) { $template = array('page-single.twig'); } else if (is_single()) { $template = array('post-single.twig'); } else if (is_category()) { $context['posts'] = Timber::get_posts( array( 'post_type' => 'post', 'cat' => $cat ) ); $template = array('category.twig'); } else if (isset($_GET['s'])) { $context['title'] = 'Zoekresultaten voor: '. get_search_query(); $context['posts'] = Timber::get_posts(); $template = array('search.twig'); } else if (is_404()) { $template = array('errors/404.twig'); } Timber::render($template, $context); ?>