-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-frontpage.php
executable file
·82 lines (77 loc) · 2.03 KB
/
template-frontpage.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
<?php
/**
* Template Name: FrontPage
*
* 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.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Royale_News
*/
get_header();
?>
<main class="main-container">
<?php
if ( is_active_sidebar( 'sidebar-2' ) ) {
?>
<div class="featured-widget-container">
<div class="container">
<?php dynamic_sidebar( 'sidebar-2' ); ?>
</div><!-- .container -->
</div>
<?php
}
$royale_news_sidebar_position = royale_news_get_option( 'royale_news_sidebar_position' );
$primary_container_class = '';
if ( 'left' === $royale_news_sidebar_position || 'right' === $royale_news_sidebar_position ) {
$primary_container_class = 'royale-news-sidebar-position-' . $royale_news_sidebar_position;
}
?>
<div class="<?php royale_news_home_middle_class(); ?> <?php echo esc_attr( $primary_container_class ); ?>">
<div class="container">
<div class="row clearfix middle-section">
<?php
if (
'none' === $royale_news_sidebar_position ||
! is_active_sidebar( 'sidebar-1' )
) {
$class = 'col-md-12';
} else {
$class = 'col-md-8 sticky-section';
}
if ( 'left' === $royale_news_sidebar_position ) {
get_sidebar();
}
?>
<div class="<?php echo esc_attr( $class ); ?>">
<?php
if ( is_active_sidebar( 'sidebar-3' ) ) {
dynamic_sidebar( 'sidebar-3' );
}
?>
</div>
<?php
if ( 'right' === $royale_news_sidebar_position ) {
get_sidebar();
}
?>
</div><!-- .row.clearfix.section -->
</div><!-- .container -->
</div>
<?php
if ( is_active_sidebar( 'sidebar-6' ) ) {
?>
<div class="bottom-widget-container">
<div class="container">
<?php dynamic_sidebar( 'sidebar-6' ); ?>
</div>
</div>
<?php
}
?>
</main><!-- .main-container -->
<?php
get_footer();