error_reporting(-1);
<?php endwhile; endif; ?>
<!-- ^^RELATED^^ -->
<?php
$related = new WP_Query( ( array( 'category__in' => wp_get_post_categories($post->ID), 'posts_per_page' => 5, 'post__not_in' => array($post->ID) ) );
if( $related->have_posts() ) {
echo '<!-- RELATED POSTS FOUND -->';
while( $related->have_posts() ) { $related->the_post();
echo '<!-- RELATED POST CONTENT -->';
the_title();
}
} else {
echo '<!-- RELATED POSTS NOT FOUND -->';
}
wp_reset_postdata();
?>
<!-- ^^RELATED^^ -->
<?php get_footer(); ?>
<?php endwhile; endif; ?>
<?php
>>>СЮДА<<<
?>
<?php get_footer(); ?>
while have_posts()
...
endwhile
>>> ВОТ СЮДА ПРИМЕРНО <<<
comments_template();
get_sidebar();
get_footer();
...
require ABSPATH.'/wp-content/plugins/wp-tiles/wp-tiles-loader.php';
$postCats = [];
foreach( get_the_category() as $category ) $postCats[] = $category->cat_ID;
if (in_array(14, $postCats)) {
include dirname(__FILE__).'/single-hotels.php';
} elseif ....
include dirname(__FILE__).'single-transport.php';
include dirname(__FILE__).'single-playground.php';
include dirname(__FILE__).'/single-transport.php';
include dirname(__FILE__).'/single-playground.php';