/
front-page.php
107 lines (92 loc) · 3.67 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
/*
* This template is used for displaying the Front Page (when selected in Settings > Reading).
*
* This template is used even when the option is selected, but a page is not. It contains fallback functionality
* to ensure content is still displayed.
*/
// Bail if accessed directly
if ( ! defined( 'ABSPATH' ) )
exit;
get_header(); ?>
<?php
// If Baton Conductor is enabled, Baton Conductor display isn't enhanced, and the Front Page Sidebar is active
if ( baton_is_baton_conductor_enabled() && ! baton_is_baton_conductor_display_enhanced() && sds_is_front_page_sidebar_active() ) : // Front Page Sidebar
?>
<!-- Front Page Sidebar -->
<aside class="front-page-widgets <?php echo ( sds_is_front_page_sidebar_active() ) ? 'widgets' : 'no-widgets'; ?>">
<?php dynamic_sidebar( 'front-page-sidebar' ); ?>
</aside>
<!-- End Front Page Sidebar -->
<!-- Content Wrapper -->
<div class="in content-wrapper-in cf">
<?php
endif;
?>
<!-- Main -->
<main role="main" class="content-wrap content-wrap-page baton-flex <?php echo ( baton_is_yoast_breadcrumbs_active() ) ? 'has-breadcrumbs' : 'no-breadcrumbs'; ?>">
<?php
// If the Front Page is active
if ( baton_has_static_front_page() ) :
// If the Front Page Sidebar is active
if ( sds_is_front_page_sidebar_active() ) : // Front Page Sidebar
?>
<!-- Front Page Sidebar -->
<aside class="front-page-widgets <?php echo ( sds_is_front_page_sidebar_active() ) ? 'widgets' : 'no-widgets'; ?>">
<?php dynamic_sidebar( 'front-page-sidebar' ); ?>
</aside>
<!-- End Front Page Sidebar -->
<?php
// Otherwise, just show the front page
else:
?>
<div class="in front-page-in baton-flex baton-flex-front-page <?php echo ( sds_is_front_page_sidebar_active() ) ? 'has-front-page-sidebar' : 'no-front-page-sidebar'; ?>">
<!-- Page Content -->
<div class="baton-col baton-col-content">
<section class="content-container content-page-container">
<?php get_template_part( 'yoast', 'breadcrumbs' ); // Yoast Breadcrumbs ?>
<?php get_template_part( 'loop', 'page' ); // Loop - Page ?>
<!-- Comments -->
<?php comments_template(); // Comments ?>
<!-- End Comments -->
<div class="clear"></div>
</section>
</div>
<!-- End Page Content -->
<!-- Primary Sidebar -->
<?php get_sidebar(); ?>
<!-- End Primary Sidebar -->
</div>
<?php
endif;
// Otherwise no Front Page is selected
else:
// If Baton Conductor is enabled
if ( baton_is_baton_conductor_enabled() ) :
get_template_part( 'loop', 'home-baton-conductor' ); // Loop - Home Baton Conductor
// Otherwise, no Baton Conductor is not enabled, show posts
else:
?>
<div class="in front-page-in baton-flex baton-flex-front-page">
<!-- Home/Blog Content -->
<div class="baton-col baton-col-content">
<section class="content-container content-home-container content-blog-container">
<?php get_template_part( 'yoast', 'breadcrumbs' ); // Yoast Breadcrumbs ?>
<?php get_template_part( 'loop', 'home' ); // Loop - Home ?>
<?php get_template_part( 'loop', 'navigation' ); // Loop - Navigation ?>
<div class="clear"></div>
</section>
</div>
<!-- End Home/Blog Content -->
<!-- Primary Sidebar -->
<?php get_sidebar(); ?>
<!-- End Primary Sidebar -->
</div>
<?php
endif;
endif;
?>
<div class="clear"></div>
</main>
<!-- End Main -->
<?php get_footer(); ?>