<?php
/**
 * The template for displaying the author pages
 *
 * Learn more: https://codex.wordpress.org/Author_Templates
 *
 * @package Magazine Style
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

get_header();
$container = get_theme_mod( 'magazinestyle_container_type' );
$postsstyle = get_theme_mod( 'magazinestyle_posts_layout', 'liststyle');
?>

<div class="wrapper" id="author-wrapper">
	<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
		<div class="row">
			<?php
			// Do the left sidebar check and open div#primary.
			get_template_part( 'global-templates/left-sidebar-check' );
			?>
		<main class="site-main" id="main">
			<?php 
				if (is_active_sidebar('author-before-posts')) {
					dynamic_sidebar('author-before-posts');
				} ?>			
				<?php get_template_part( 'loop-templates/posts/posts', $postsstyle ); ?>
			</main>
			<?php
			// Display the pagination component.
			magazinestyle_pagination();

			// Do the right sidebar check and close div#primary.
			get_template_part( 'global-templates/right-sidebar-check' );
			?>

		</div> <!-- .row -->

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

</div><!-- #author-wrapper -->

<?php
get_footer();
