forked from rodrigo-gpereira/zero-theme-elementor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
27 lines (22 loc) · 819 Bytes
/
index.php
File metadata and controls
27 lines (22 loc) · 819 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
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header();
$is_elementor_theme_exist = function_exists( 'elementor_theme_do_location' );
if ( is_singular() ) {
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
get_template_part( 'template-parts/single' );
}
} elseif ( is_archive() || is_home() ) {
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
get_template_part( 'template-parts/archive' );
}
} elseif ( is_search() ) {
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
get_template_part( 'template-parts/search' );
}
} elseif ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
get_template_part( 'template-parts/404' );
}
get_footer();