-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
175 lines (163 loc) · 7.32 KB
/
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package color_newsmagazine
*/
get_header();
if( is_home() or (is_front_page())):
if ( get_theme_mod('color_newsmagazine_big_defaulttemplate_enable','1')) {
get_template_part( 'sections/section','big-news' );
}
if(get_theme_mod('color_newsmagazine_mainnews_defaulttemplate_enable','1' )):
get_template_part( 'sections/section','main-news' );
endif ;
if(get_theme_mod('color_newsmagazine_videoslider_defaulttemplate_enable','1' )):
get_template_part( 'sections/section','feature-video' );
endif ;
endif ; ?>
<section id ="page-homepage" class="central container">
<div class="row">
<?php if ( get_theme_mod('color_newsmagazine_sidebar_layout_settings','right') == 'left' ) : ?>
<?php if ( is_front_page()):
if ( ( is_active_sidebar( 'sidebar-1' ) or (get_theme_mod('color_newsmagazine_SiteAuthor_enable','0')== 1) or (get_theme_mod('color_newsmagazine_sidebarnews_b1_enable','1')== 1 ) or ( get_theme_mod('color_newsmagazine_sidebarnews_b2_enable','1') == 1 ) ) ) { ?>
<div class="col-lg-3 nopadding">
<!-- Blog Sidebar -->
<?php get_sidebar();?>
<!--/ End Blog Sidebar -->
</div>
<?php }
if ( ( is_active_sidebar( 'sidebar-1' ) or (get_theme_mod('color_newsmagazine_SiteAuthor_enable','0')== 1) or (get_theme_mod('color_newsmagazine_sidebarnews_b1_enable','1')== 1 ) or ( get_theme_mod('color_newsmagazine_sidebarnews_b2_enable','1') == 1 ) ) ) { ?>
<div class="col-lg-9 nopadding ">
<?php } else { ?>
<div class="col-lg-12 nopadding box">
<?php }
else:
if ( ( is_active_sidebar( 'sidebar-1' ) or (get_theme_mod('color_newsmagazine_SiteAuthor_enable','0')== 1) or (get_theme_mod('color_newsmagazine_sidebarnews_b1_enable','1')== 1 ) or ( get_theme_mod('color_newsmagazine_sidebarnews_b2_enable','1') == 1 ) ) and ( get_theme_mod('color_newsmagazine_sidebar_enable_postpage_detail_homepage','1') == 1 ) ) { ?>
<div class="col-lg-3 nopadding">
<!-- Blog Sidebar -->
<?php get_sidebar();?>
<!--/ End Blog Sidebar -->
</div>
<?php }
if ( ( is_active_sidebar( 'sidebar-1' ) or (get_theme_mod('color_newsmagazine_SiteAuthor_enable','0')== 1) or (get_theme_mod('color_newsmagazine_sidebarnews_b1_enable','1')== 1 ) or ( get_theme_mod('color_newsmagazine_sidebarnews_b2_enable','1') == 1 ) ) and ( get_theme_mod('color_newsmagazine_sidebar_enable_postpage_detail_homepage','1') == 1 ) ) { ?>
<div class="col-lg-9 nopadding">
<?php } else { ?>
<div class="col-lg-12 nopadding box">
<?php }
endif; ?>
<article id="post-<?php the_ID(); ?>" class="breadcrumbs" <?php post_class(); ?> data-stellar-background-ratio="0.5">
<?php if ( !(is_home() || is_front_page()) ): ?>
<div class="breadcrumbs-author">
<header>
<?php
echo '<h1 class="entry-title">';
the_title();
echo '</h1>';
color_newsmagazine_breadcrumb_trail();
?>
</header>
<?php if(get_theme_mod('color_newsmagazine_singlepage_author_enable','1')==1): ?>
<?php get_template_part( 'inc/single-author-section' ); ?>
<?php endif ;?>
</div>
<?php endif ;?>
<div id = "single-page-detail" class="single-page-detail" >
<?php if(has_post_thumbnail()):?>
<div class="single-image">
<?php the_post_thumbnail();?>
</div>
<?php endif;
if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile; // End of the loop.
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</div>
</article>
</div>
<?php endif ;?>
<?php if ( get_theme_mod('color_newsmagazine_sidebar_layout_settings','right') == 'right' ) : ?>
<?php if ( is_front_page()):
if ( ( is_active_sidebar( 'sidebar-1' ) or (get_theme_mod('color_newsmagazine_SiteAuthor_enable','0')== 1) or (get_theme_mod('color_newsmagazine_sidebarnews_b1_enable','1')== 1 ) or ( get_theme_mod('color_newsmagazine_sidebarnews_b2_enable','1') == 1 ) ) ) { ?>
<div class="col-lg-9 nopadding">
<?php } else { ?>
<div class="col-lg-12 nopadding box">
<?php }
else:
if ( ( is_active_sidebar( 'sidebar-1' ) or (get_theme_mod('color_newsmagazine_SiteAuthor_enable','0')== 1) or (get_theme_mod('color_newsmagazine_sidebarnews_b1_enable','1')== 1 ) or ( get_theme_mod('color_newsmagazine_sidebarnews_b2_enable','1') == 1 ) ) and ( get_theme_mod('color_newsmagazine_sidebar_enable_postpage_detail_homepage','1') == 1 ) ) { ?>
<div class="col-lg-9 nopadding">
<?php } else { ?>
<div class="col-lg-12 nopadding box">
<?php }
endif; ?>
<article id="post-<?php the_ID(); ?>" class="breadcrumbs" <?php post_class(); ?> data-stellar-background-ratio="0.5">
<?php if ( !(is_home() || is_front_page()) ): ?>
<div class="breadcrumbs-author">
<header>
<?php
echo '<h1 class="entry-title">';
the_title();
echo '</h1>';
color_newsmagazine_breadcrumb_trail();
?>
</header>
<?php if(get_theme_mod('color_newsmagazine_singlepage_author_enable','1')==1): ?>
<?php get_template_part( 'inc/single-author-section' );
endif ;?>
</div>
<?php endif ;?>
<div id = "single-page-detail" class="single-page-detail" >
<?php if(has_post_thumbnail()):?>
<div class="single-image">
<?php the_post_thumbnail();?>
</div>
<?php endif;
if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile; // End of the loop.
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</div>
</article>
</div>
<?php if ( is_front_page()):
if ( ( is_active_sidebar( 'sidebar-1' ) or (get_theme_mod('color_newsmagazine_SiteAuthor_enable','0')== 1) or (get_theme_mod('color_newsmagazine_sidebarnews_b1_enable','1')== 1 ) or ( get_theme_mod('color_newsmagazine_sidebarnews_b2_enable','1') == 1 ) ) ) { ?>
<div class="col-lg-3 nopadding">
<!-- Blog Sidebar -->
<?php get_sidebar();?>
<!--/ End Blog Sidebar -->
</div>
<?php };
else:
if ( ( is_active_sidebar( 'sidebar-1' ) or (get_theme_mod('color_newsmagazine_SiteAuthor_enable','0')== 1) or (get_theme_mod('color_newsmagazine_sidebarnews_b1_enable','1')== 1 ) or ( get_theme_mod('color_newsmagazine_sidebarnews_b2_enable','1') == 1 ) ) and ( get_theme_mod('color_newsmagazine_sidebar_enable_postpage_detail_homepage','1') == 1 ) ) { ?>
<div class="col-lg-3 nopadding">
<!-- Blog Sidebar -->
<?php get_sidebar();?>
<!--/ End Blog Sidebar -->
</div>
<?php }
endif;
endif ;?>
</div>
</section>
<?php
get_footer();
?>