-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage-instagram.php
39 lines (33 loc) · 937 Bytes
/
page-instagram.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* Template Name: Instagram
* Description: Template for the home page.
*
* @package WordPress
* @subpackage Timber
* @since Timber 0.1
*/
/**
* Template Name: Instagram
* Description: Template for the instagram page.
*
* @package WordPress
* @subpackage Timber
* @since Timber 0.1
*/
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
$context['sidebar'] = Timber::get_widgets('sidebar');
$context['navbar'] = Timber::get_widgets('navbar');
$context['footer'] = Timber::get_widgets('footer');
$instagram_args = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => -1,
'meta_key' => 'featured_on_instagram',
'order'=>'DESC',
'orderby'=>'featured_on_instagram',
);
$context['instagram_posts'] = Timber::get_posts($instagram_args);
Timber::render( array( 'page-instagram.twig', 'page.twig' ), $context );