?php require(‘header.php’); ?>
<?php if ( have_posts() ) { ?>
<?php while ( have_posts() ) { the_post(); ?>
<?php set_post_views( get_the_ID() ); ?>
<article class=»post»>
<h1 class=»post__headline»><?php the_title(); ?></h1>
<div class=»post__entry»>
<?php the_content(); ?>
<?php edit_post_link( ‘Редактировать’, ‘<p>’, ‘</p>’ ); ?>
</div><!— .post__entry —>
</article><!— .post —>
<?php if ( function_exists(‘the_ratings’) ) { ?>
<div class=»post-rating»>
<div class=»post-rating__title»>Помогла статья? Оцените её</div>
<div class=»post-rating__rate»><?php the_ratings(); ?></div>
</div><!— .post-rating —>
<?php } ?>
<?php if ( function_exists(‘related_posts’) ) related_posts(); ?>
<div class=»grid»>
<div class=»comments»>
<?php comments_template(); ?>
</div><!— .comments —>
<?php dynamic_sidebar(‘comments’) ?>
</div><!— .grid —>
<?php } ?>
<?php } ?>
<?php if($sidebarsingle==»on») { ?>
<?php require(‘sidebar.php’); ?>
<?php } ?>
<?php require(‘footer.php’); ?