%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/businessmultisite/wp-content/themes/stripes_weekly/
Upload File :
Create Path :
Current File : /var/www/businessmultisite/wp-content/themes/stripes_weekly/front-page.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['post'] = new TimberPost();

$args = array(
    'post_type' => 'articles',
    'post_status' => 'publish',
    'post_parent' => 0
);

if(isset($_COOKIE['geo']) && $_COOKIE['geo'] != '') {
				
    $args['tax_query'] = array(
        array(
            'taxonomy' => 'geo',
            'field'    => 'id',
            'terms'    => explode(',',$_COOKIE['geo'])
        )
    );
}

$args['posts_per_page'] = 12;

$context['posts'] = Timber::get_posts($args);	

$args['posts_per_page'] = -1;

$context['found_posts'] = count(Timber::get_posts($args));	



$context['puffs'] = get_field('puffs', $context['post']->ID);

$templates        = array( 'front-page.twig' );

Timber::render( $templates, $context );

Zerion Mini Shell 1.0