forked from argoproject/Argo
-
-
Notifications
You must be signed in to change notification settings - Fork 83
/
home.php
60 lines (49 loc) · 1.78 KB
/
home.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 homepage template
*
* @package Largo
* @since 0.1
*/
/**
* ======== DO NOT EDIT OR CLONE THIS FILE FOR A CHILD THEME =======
*
* Largo comes with a built-in homepage template system, documented in homepages/README.md
* It's generally better to use that system than to have your child theme use its own home.php template
*/
get_header();
/*
* Collect post IDs in each loop so we can avoid duplicating posts
* and get the theme option to determine if this is a two column or three column layout
*/
$shown_ids = array();
$home_template = largo_get_active_homepage_layout();
$layout_class = of_get_option('home_template');
global $largo;
if ($home_template == 'LegacyThreeColumn')
$span_class = 'span8';
else
$span_class = ( $largo['home_rail'] ) ? 'span8' : 'span12' ;
?>
<div id="content" class="stories <?php echo $span_class; ?> <?php echo sanitize_html_class(basename($home_template)); ?>" role="main">
<?php
largo_render_homepage_layout($home_template);
if ($home_template !== 'LegacyThreeColumn') {
do_action('largo_before_sticky_posts');
// sticky posts box if this site uses it
if ( of_get_option( 'show_sticky_posts' ) ) {
get_template_part( 'partials/sticky-posts', 'home' );
}
do_action('largo_after_sticky_posts');
// bottom section, we'll either use a two-column widget area or a single column list of recent posts
if ( of_get_option('homepage_bottom') === 'widgets' ) {
get_template_part('partials/home-bottom', 'widget-area');
} else if (of_get_option('homepage_bottom') === 'list') {
get_template_part('partials/home-post-list');
}
do_action('largo_after_homepage_bottom');
}
?>
</div><!-- #content-->
<?php if ($largo['home_rail']) get_sidebar(); ?>
<?php get_footer();