-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
60 lines (51 loc) · 1.58 KB
/
front-page.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?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.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package Ryu
* @subpackage SabinesRyu
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<div class="hentry">
<div class="wrap tiles-wrap clear">
<!-- TILES for demo version -->
<?php
$args= array(
'post_type' => 'writing',
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => 'is_home_page_feature',
'value' => '1',
'compare' => '==',
),
),
'meta_key' => 'home_page_feature_order',
'orderby' => 'meta_value',
'order' => 'ASC'
);
$home_features_query = new WP_Query($args);
if( have_posts() ) :
while ( $home_features_query->have_posts() ) : $home_features_query->the_post(); ?>
<?php get_template_part( '_home-feature-tile', get_post_type() ); ?>
<?php
endwhile;
wp_reset_postdata(); ?>
</div><!-- /.tiles-wrap -->
</div><!-- /.hentry -->
<!-- page footer -->
<?php include '_page-footer-widgets.php' ?>
<?php else : ?>
<?php get_template_part( 'no-results', 'index' ); ?>
<?php endif; ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>