-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
149 lines (141 loc) · 7.47 KB
/
index.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
<?php
/**
* The main template file
*
* 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://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package color_newsmagazine
*/
get_header();
if ( get_theme_mod('color_newsmagazine_big_blogpage_enable','1')==1) {
get_template_part( 'sections/section','big-news' );
}
if ( get_theme_mod('color_newsmagazine_mainnews_blogpage_enable','1')==1) {
get_template_part( 'sections/section','main-news' );
}
if ( get_theme_mod('color_newsmagazine_videoslider_blogpage_enable','1')==1) {
get_template_part( 'sections/section','feature-video' );
}
?>
<!-- News Category -->
<?php
if (get_theme_mod('color_newsmagazine_sidebar_layout_settings','right') == 'right'): ?>
<section id ="central-body-index">
<div class=" central container">
<div class="row">
<?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="mainbar col-lg-9 nopadding">
<?php } else { ?>
<div class="mainbar col-lg-12 nopadding box">
<?php }
if (get_theme_mod('color_newsmagazine_BodyBlockbar_enable','1')):
dynamic_sidebar( 'frontpage-news-layout' );
endif;
$color_newsmagazine_slug1 = get_theme_mod('color_newsmagazine_layout_order1','1');
$color_newsmagazine_slug2 = get_theme_mod('color_newsmagazine_layout_order2','2');
$color_newsmagazine_slug3 = get_theme_mod('color_newsmagazine_layout_order3','3');
$color_newsmagazine_slug4 = get_theme_mod('color_newsmagazine_layout_order4','4');
$color_newsmagazine_slug5 = get_theme_mod('color_newsmagazine_layout_order5','5');
$color_newsmagazine_slug6 = get_theme_mod('color_newsmagazine_layout_order6','6');
$color_newsmagazine_slug7 = get_theme_mod('color_newsmagazine_layout_order7','7');
$color_newsmagazine_slug20 = get_theme_mod('color_newsmagazine_layout_order20','20'); //this is blog post
if (! $color_newsmagazine_slug1 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug1).'.php' ;
}
if (! $color_newsmagazine_slug2 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug2).'.php' ;
}
if (! $color_newsmagazine_slug3 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug3).'.php' ;
}
if (! $color_newsmagazine_slug4 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug4).'.php' ;
}
if (! $color_newsmagazine_slug5 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug5).'.php' ;
}
if (! $color_newsmagazine_slug6 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug6).'.php' ;
}
if (! $color_newsmagazine_slug7 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug7).'.php' ;
}
if (! $color_newsmagazine_slug20 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug20).'.php' ;
}
?>
</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-3 nopadding">
<!-- Blog Sidebar -->
<?php get_sidebar();?>
<!--/ End Blog Sidebar -->
</div>
<?php } ?>
</div>
</div>
</section>
<?php elseif (get_theme_mod('color_newsmagazine_sidebar_layout_settings','right') == 'left'): ?>
<section id ="central-body-index">
<div class=" central container">
<div class="row">
<?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-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="mainbar col-lg-9 nopadding">
<?php } else { ?>
<div class="mainbar col-lg-12 nopadding box">
<?php }
if (get_theme_mod('color_newsmagazine_BodyBlockbar_enable','1')):
dynamic_sidebar( 'frontpage-news-layout' );
endif;
$color_newsmagazine_slug1 = get_theme_mod('color_newsmagazine_layout_order1','1');
$color_newsmagazine_slug2 = get_theme_mod('color_newsmagazine_layout_order2','2');
$color_newsmagazine_slug3 = get_theme_mod('color_newsmagazine_layout_order3','3');
$color_newsmagazine_slug4 = get_theme_mod('color_newsmagazine_layout_order4','4');
$color_newsmagazine_slug5 = get_theme_mod('color_newsmagazine_layout_order5','5');
$color_newsmagazine_slug6 = get_theme_mod('color_newsmagazine_layout_order6','6');
$color_newsmagazine_slug7 = get_theme_mod('color_newsmagazine_layout_order7','7');
$color_newsmagazine_slug20 = get_theme_mod('color_newsmagazine_layout_order11','20'); //this is blog post
if (! $color_newsmagazine_slug1 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug1).'.php' ;
}
if (! $color_newsmagazine_slug2 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug2).'.php' ;
}
if (! $color_newsmagazine_slug3 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug3).'.php' ;
}
if (! $color_newsmagazine_slug4 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug4).'.php' ;
}
if (! $color_newsmagazine_slug5 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug5).'.php' ;
}
if (! $color_newsmagazine_slug6 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug6).'.php' ;
}
if (! $color_newsmagazine_slug7 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug7).'.php' ;
}
if (! $color_newsmagazine_slug20 ==0) {
require_once trailingslashit( get_template_directory() ) . 'news-layouts/layouts-'.esc_attr($color_newsmagazine_slug20).'.php' ;
}
?>
</div>
</div>
</div>
</section>
<?php endif;
get_footer();
?>