<?php
/**
 * The template to display the attachment
 *
 * @package TOURIMO
 * @since TOURIMO 1.0
 */


get_header();

while ( have_posts() ) {
	the_post();

	// Display post's content
	get_template_part( apply_filters( 'tourimo_filter_get_template_part', 'templates/content', 'single-' . tourimo_get_theme_option( 'single_style' ) ), 'single-' . tourimo_get_theme_option( 'single_style' ) );

	// Parent post navigation.
	$tourimo_posts_navigation = tourimo_get_theme_option( 'posts_navigation' );
	if ( 'links' == $tourimo_posts_navigation ) {
		?>
		<div class="nav-links-single<?php
			if ( ! tourimo_is_off( tourimo_get_theme_option( 'posts_navigation_fixed' ) ) ) {
				echo ' nav-links-fixed fixed';
			}
		?>">
			<?php
			the_post_navigation(
				array(
					'next_text' => '<span class="nav-arrow"></span>'
						. '<span class="screen-reader-text">' . esc_html__( 'Next Post', 'tourimo' ) . '</span> '
						. '<h6 class="post-title">%title</h6>'
						. '<span class="post_date">%date</span>',
					'prev_text' => '<span class="nav-arrow"></span>'
						. '<span class="meta-nav" aria-hidden="true">' . esc_html__( 'Published in', 'tourimo' ) . '</span> '
						. '<span class="screen-reader-text">' . esc_html__( 'Previous post:', 'tourimo' ) . '</span> '
						. '<h5 class="post-title">%title</h5>'
						. '<span class="post_date">%date</span>',
				)
			);
			?>
		</div>
		<?php
	}

	// Comments
	do_action( 'tourimo_action_before_comments' );
	comments_template();
	do_action( 'tourimo_action_after_comments' );
}

get_footer();
