<?php
/**
 * The template for displaying all single posts and attachments
 *
 * @package Meridian One
 * @since 1.0
 */

get_header(); ?>

	<div id="content" <?php meridian_one_content_class(); ?> role="main">

		<?php

			// Loop posts
			while ( have_posts() ) : the_post();

				// Output content
				get_template_part( 'template-parts/content-single', get_post_format() );

				// About author
				get_template_part( 'template-parts/main/about-author' );

				// prev/next post
				the_post_navigation( array(
					'prev_text' => '<span class="blog-post-single-nav-button"><span class="fa fa-arrow-left"></span>' . esc_html__( 'Previous post', 'meridian-one' ) . '</span>%title',
					'next_text' => '<span class="blog-post-single-nav-button">' . esc_html__( 'Next post', 'meridian-one' ) . '<span class="fa fa-arrow-right"></span></span>%title'
				) );

				// If comments are open or we have at least one comment, load up the comment template.
				if ( comments_open() || get_comments_number() ) {
					comments_template();
				}

			// End loop posts
			endwhile;
		?>

	</div><!-- #content -->

	<?php get_sidebar(); ?>

<?php get_footer();
