%PDF- %PDF-
Direktori : /var/www/knwn/wp-content/themes/kn-wn/ |
Current File : //var/www/knwn/wp-content/themes/kn-wn/index.php |
<?php /** * The main template file * This is the most generic template file in a WordPress theme * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file exists * * Methods for TimberHelper can be found in the /lib sub-directory * * @package WordPress * @subpackage Timber * @since Timber 0.1 */ $context = Timber::context(); $context['found_posts'] = Timber::get_posts(array( 'numberposts' => -1, 'post_type' => 'post', 'orderby' => 'date', 'order' => 'DESC' )); $context['posts'] = Timber::get_posts(array( 'numberposts' => intval($context['posts_per_page']), 'post_type' => 'post', 'orderby' => 'date', 'order' => 'DESC' )); $context['categories'] = Timber::get_terms( 'category', [ 'hide_empty' => true, ]); $templates = array( 'index.twig' ); Timber::render( $templates, $context );