first
This commit is contained in:
41
wp-content/themes/simple-theme/index.php
Normal file
41
wp-content/themes/simple-theme/index.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?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();
|
Reference in New Issue
Block a user