-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
51 lines (39 loc) · 1.16 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
<?php
/**
* Created by PhpStorm.
* Project : alpha-elemenda.
* User: hadie MacBook
* Date: 04/06/20
* Time: 03.01
*/
get_header();
$is_elemenda_theme_exist = function_exists( 'elemenda_theme_do_location' );
?>
<div class="elemenda site-wrapper <?php echo is_active_sidebar('main-sidebar' )? 'has-sidebar':'';?>">
<main class="site-main" role="main">
<div class="container ">
<?php
if ( is_singular() ) {
if ( ! $is_elemenda_theme_exist || ! elemenda_theme_do_location( 'single' ) ) {
get_template_part( 'template-parts/single' );
}
} elseif ( is_archive() || is_home() ) {
if ( ! $is_elemenda_theme_exist || ! elemenda_theme_do_location( 'archive' ) ) {
get_template_part( 'template-parts/archive' );
}
} elseif ( is_search() ) {
if ( ! $is_elemenda_theme_exist || ! elemenda_theme_do_location( 'search' ) ) {
get_template_part( 'template-parts/search' );
}
} else {
if ( ! $is_elemenda_theme_exist || ! elemenda_theme_do_location( 'single' ) ) {
get_template_part( 'template-parts/404' );
}
}
?>
<?php get_sidebar();?>
</div>
</main>
</div><!--main-div-->
<?php
get_footer();