<?php
/**
 * The post template file.
 * @package RetroTale
 * @since RetroTale 1.0.0
*/
get_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ( !has_post_format('status') && !has_post_format('aside') ) { ?>
    <div class="content-headline">
      <h1 class="entry-headline"><?php the_title(); ?></h1>
<?php retrotale_get_breadcrumb(); ?>
    </div>
<?php } ?>
<?php retrotale_get_display_image_post(); ?>
<?php if ( $retrotale_options_db['retrotale_display_meta_post'] != 'Hide' ) { ?>
    <p class="post-meta">
      <span class="post-info-author"><i class="icon_pencil-edit" aria-hidden="true"></i><?php the_author_posts_link(); ?></span>
      <span class="post-info-date"><i class="icon_clock_alt" aria-hidden="true"></i><?php echo get_the_date(); ?></span>
<?php if ( comments_open() ) : ?>
      <span class="post-info-comments"><i class="icon_comment_alt" aria-hidden="true"></i><a href="<?php comments_link(); ?>"><?php printf( _n( '1 комментарий', '%1$s комментариев', get_comments_number(), 'songwriter' ), number_format_i18n( get_comments_number() ), get_the_title() ); ?></a></span>
<?php endif; ?>
    </p>
    <div class="post-info">
      <p class="post-category"><span class="post-info-category"><i class="icon_folder-alt" aria-hidden="true"></i><?php the_category(', '); ?></span></p>
<?php if ( has_tag() ) { ?>
      <p class="post-tags"><?php the_tags( '<span class="post-info-tags"><i class="icon_tag_alt" aria-hidden="true"></i>', ', ', '</span>' ); ?></p>
<?php } ?>
    </div>
<?php } ?>
    <div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<p class="page-link"><span>' . __( 'Страницы:', 'retrotale' ) . '</span>', 'after' => '</p>' ) ); ?>
<?php edit_post_link( __( 'Править', 'retrotale' ), '<p class="edit-link">', '</p>' ); ?>
<?php endwhile; endif; ?>
<?php if ( $retrotale_options_db['retrotale_next_preview_post'] != 'Hide' ) { ?>
<?php retrotale_prev_next('retrotale-post-nav'); ?>
<?php } ?>
<?php comments_template( '', true ); ?>
    </div>   
  </div> <!-- end of content -->
<?php if ($retrotale_options_db['retrotale_display_sidebar'] != 'Hide') { ?>
<?php get_sidebar(); ?>
<?php } ?>
<?php get_footer(); ?>