<?php
if (!defined('ABSPATH')) exit;
/**
 * The main template file.
 *
 * It is used to show single post.
 *
 */

get_header();

//check if post has the image.
$postimgg = '';
$postimgg = tt_logiscargo_post_thumb('770', '310', false, true, true);
?>
<?php do_action( 'tt_before_mainblock' ); ?>
<section class="sec-padding blog-page single-post-page mainblock">
    <div class="thm-container">
        <div class="row">

            <div class="col-md-8">
				<div class="single-post-wrapper">

					<!-- loop starts -->
					<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

					<article <?php post_class( 'single-blog-post img-cap-effect' ); ?>>
				        <?php if ( has_post_thumbnail() ) { ?>
				        <div class="img-box">
				        <img src="<?php echo wp_kses_post($postimgg); ?>" alt="<?php the_title(); ?>">
				       </div>
				        <?php }?>
				        <div class="meta-info">
				            <?php get_template_part( 'inc/templates/tt-post-date' ); ?>
				            <div class="content-box">
				                <h3><?php the_title();?></h3>
				                <?php get_template_part( 'inc/templates/tt-post-meta' ); ?>
				            </div>
				        </div>
				        <!-- .content -->
				        <div class="content">
				           <?php the_content(); ?>
					       <?php wp_link_pages(); ?>
				        </div><!-- /.content -->
					</article>

					<!-- Tags  -->
					<span class="singletags"><?php the_tags($before = '', $sep = ', ', $after = ''); ?></span>

					<!-- Post nav -->
					<div class="clearfix mbottom30"></div>
					<?php if( function_exists('tt_logiscargo_prev_post') ) echo tt_logiscargo_prev_post(); ?>
					<?php if( function_exists('tt_logiscargo_next_post') ) echo tt_logiscargo_next_post(); ?>
					<div class="clearfix"></div>

					<?php endwhile; endif; ?>

					<!-- Post sharing meta -->
				    <?php get_template_part( 'inc/templates/tt-post-sharing' ); ?>

					<!-- Author box -->
				    <?php if ( ( '' !== get_the_author_meta( 'description' )) && tt_temptt_get_option( 'post_author', 1 ) ) {
				        get_template_part( 'inc/templates/tt-post-author' );
				    }
				    ?>
					<!-- Comments nav -->
					<div class="comment-part">
				        <?php
						if ( comments_open() ) {
						 comments_template( '', true );
						}
				        ?>
				    </div>
				</div>

            </div>

            <div class="col-md-4">
				<?php get_sidebar(); ?>
            </div>

        </div>
    </div>
</section>

<?php get_footer(); ?>