<?php endwhile; endif; ?>
<?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() ) {
while( $related->have_posts() ) { $related->the_post();
the_title();
}
}
wp_reset_postdata();
?>
<?php get_footer(); ?>
<?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() ) {
while( $related->have_posts() ) { $related->the_post();
the_title();
}
}
wp_reset_postdata();
?>
<?php
/**
* @package Stag_Customizer
*/
get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="popap-title">
<?php get_template_part( 'partials/entry', 'title' ); ?>
</div>
<div class="single-post-content">
<main id="main" class="site-main" role="main">
<?php get_template_part( 'partials/content', 'single' ); ?>
</main>
<div class="line"></div>
<div class="category">
<?php the_category(' '); ?>
</div>
<?php get_template_part( 'partials/entry', 'date' ); ?>
</div>
<?php stag_related_posts(); ?>
<div class="comment-list-wrapper"><h3>Комментарии</h3></div>
<div class="single-post-comments">
<?php get_template_part( 'partials/content', 'comments' ); ?>
</div>
<div class="post-links-next"><i class="fa fa-arrow-circle-right"></i>
<?php previous_post_link('<strong>%link</strong>'); ?>
</div>
<div class="post-links-previous"><i class="fa fa-arrow-circle-left"></i>
<?php next_post_link('<strong>%link</strong>'); ?>
</div>
<?php endwhile; endif; ?>
<?php get_footer(); ?>