Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template for displaying the homepage when set to a static page. Check
- * the Reading Settings page: Settings -> Reading -> "Your homepage displays".
- */
- $context = Timber::get_context();
- $post = new TimberPost();
- $context['post'] = $post;
- // Add the `carousels` to the Timber's context.
- $args = array(
- 'post_type' => 'gw_carousel',
- 'posts_per_page' => -1,
- 'orderby' => array(
- 'date' => 'DESC'
- ));
- $context['carousels'] = Timber::get_posts($args);
- // Now set Timber to use the front-page.twig template.
- Timber::render( array( 'front-page.twig' ), $context );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement