-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.php
More file actions
38 lines (32 loc) · 930 Bytes
/
index.php
File metadata and controls
38 lines (32 loc) · 930 Bytes
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
<?php if ( !defined('ABSPATH') ) die();
/**
* The main template file.
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage From_Scratch
* @since 1.0
* @version 1.0
*/
if ( is_search() || is_post_type_archive() ) {
$sidebar = false;
} else if ( get_theme_mod('blog_sidebar') == false ) {
$sidebar = false;
} else if ( get_theme_mod('blog_sidebar') != false || get_theme_mod('blog_sidebar') == null ) {
$sidebar = true;
} else {
$sidebar = false;
}
get_header(); ?>
<?php get_template_part( 'template-parts/page', 'banner' ); ?>
<div class="page-wrap<?php if ($sidebar) { echo ' has-sidebar'; } ?>">
<?php
if ($sidebar) {
get_template_part( 'template-parts/sidebar', 'burger' );
get_sidebar();
}
get_template_part( 'template-parts/index', 'content' );
?>
</div>
<?php get_footer(); ?>