-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-home.php
executable file
·58 lines (57 loc) · 1.83 KB
/
page-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
<?php
/**
* Template Name: Home Page
*/
get_header();
?>
<?php
$page_layout = Sierra_Helper::get_layout( 'sierra_page_layout' );
if( class_exists( 'Epsilon_Page_Generator' ) ){
$sierra_page_layout = Epsilon_Page_Generator::get_instance( 'sierra_frontpage_sections_' . get_the_ID(), get_the_ID() );
}
if ( ! empty( $sierra_page_layout -> sections ) ) :
$sierra_page_layout -> generate_output();
else :
?>
<section class="blog_main_area p_100">
<div class="container">
<div class="row">
<?php if ( 'left-sidebar' === $page_layout['type'] && is_active_sidebar( 'sidebar-1' ) ) { ?>
<div class="col-lg-<?php echo esc_attr( $page_layout['columns']['sidebar']['span'] ); ?>">
<?php get_sidebar(); ?>
</div>
<?php } ?>
<div class="<?php echo ( 1 === $page_layout['columnsCount'] && ! is_active_sidebar( 'sidebar' ) ) ? 'col-sm-12' : 'col-sm-' . esc_attr( $page_layout['columns']['content']['span'] ); ?>">
<div class="blog_main_inner">
<div class="s_blog_main">
<?php
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
?>
</div>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'sierra' ),
'after' => '</div>',
) );
?>
<div class="sierra_clear"></div>
<?php
if ( comments_open() || get_comments_number() ) {
comments_template();
}
?>
</div>
</div>
<?php if ( 'right-sidebar' === $page_layout['type'] && is_active_sidebar( 'sidebar-1' ) ) { ?>
<div class="col-lg-<?php echo esc_attr( $page_layout['columns']['sidebar']['span'] ); ?>">
<?php get_sidebar(); ?>
</div>
<?php } ?>
</div>
</div>
</section>
<?php
endif;
get_footer();