<?php
get_header();
?>

<main id="primary" class="site-main" role="main">
	<div class="container">
		<div class="single-post-wrap">

			<?php
			if ( ! is_front_page() && ( ! function_exists( 'vista_show' ) || vista_show( 'show_breadcrumb', true ) ) ) {
				vista_breadcrumbs();
			}
			?>

			<?php
			while ( have_posts() ) :
				the_post();
				?>

				<article id="page-<?php the_ID(); ?>" <?php post_class( 'page-content-wrap' ); ?>>

					<?php if ( ! is_front_page() ) : ?>
						<header class="page-header" style="margin-bottom:36px;">
							<h1 class="post-header-title"><?php the_title(); ?></h1>
						</header>
					<?php endif; ?>

					<div class="post-content">
						<?php
						the_content();

						wp_link_pages(
							array(
								'before' => '<div class="page-links">' . esc_html__( 'صفحات:', 'vista' ),
								'after'  => '</div>',
							)
						);
						?>
					</div>

					<?php if ( get_edit_post_link() ) : ?>
						<footer class="page-footer" style="margin-top:32px;">
							<?php
							edit_post_link(
								sprintf(
									wp_kses(
										__( 'ویرایش <span class="screen-reader-text">%s</span>', 'vista' ),
										array( 'span' => array( 'class' => array() ) )
									),
									wp_kses_post( get_the_title() )
								),
								'<span class="edit-link">',
								'</span>'
							);
							?>
						</footer>
					<?php endif; ?>

				</article>

			<?php endwhile; ?>

		</div>
	</div>
</main>

<?php
get_footer();
