42 lines
774 B
PHP
42 lines
774 B
PHP
<?php
|
|
|
|
echo "<!-- index.php -->";
|
|
|
|
|
|
if (!defined('ABSPATH')) {
|
|
exit; // Exit if accessed directly.
|
|
}
|
|
|
|
get_header();
|
|
|
|
|
|
if (is_page('home') || is_home()) {
|
|
//
|
|
echo "<!-- Тут -->";
|
|
get_template_part('template-parts/home');
|
|
} elseif (is_page('for-page')) {
|
|
//
|
|
get_template_part('template-parts/for-page');
|
|
//
|
|
} elseif (is_page('search')) {
|
|
//
|
|
get_template_part('template-parts/search');
|
|
//
|
|
} elseif (is_singular()) {
|
|
//
|
|
get_template_part('template-parts/single');
|
|
//
|
|
// } elseif (is_post_type_archive('products')) {
|
|
// //
|
|
// get_template_part('template-parts/products/archive');
|
|
// //
|
|
} elseif (is_archive()) {
|
|
//
|
|
get_template_part('template-parts/archive');
|
|
//
|
|
} else {
|
|
get_template_part('template-parts/404');
|
|
}
|
|
|
|
get_footer();
|