<?php
/**
* Default Template Main File.
*
* @package MINIMALIN
* @author TonaTheme
* @version 1.0
*/
get_header();
$data = \MINIMALIN\Includes\Classes\Common::instance()->data( 'single' )->get();
$layout = $data->get( 'layout' );
$sidebar = $data->get( 'sidebar' );
$layout = ( $layout ) ? $layout : 'full';
$sidebar = ( $sidebar ) ? $sidebar : '';
if (is_active_sidebar( $sidebar )) {$layout = 'right';} else{$layout = 'full';}
$class = ( !$layout || $layout == 'full' ) ? 'col-xl-12 col-lg-12 col-md-12 col-12' : 'col-xl-9 col-lg-9 col-md-12 col-12';
?>
<?php if ( $data->get( 'enable_banner' ) ) : ?>
<?php do_action( 'minimalin_banner', $data );?>
<?php else:?>
<!--Start breadcrumb Style1-->
<div class="breadcrumb" <?php if( $data->get( 'banner' ) ){?>style="background-image: url(<?php echo esc_url( $data->get( 'banner' ) ); ?>);"<?php };?>>
<div class="container">
<div class="row">
<div class="col-xl-12">
<div class="breadcrumb__title">
<h1><?php if( $data->get( 'title' ) ) echo wp_kses( $data->get( 'title' ), true ); else( the_title( ) ); ?></h1>
<?php if(minimalin_the_breadcrumb()){ ?>
<ul>
<?php echo minimalin_the_breadcrumb(); ?>
</ul>
<?php };?>
</div>
</div>
</div>
</div>
</div>
<!--End breadcrumb Style1-->
<?php endif;?>
<!-- sidebar-page-container -->
<section class="blog sp_bottom_80 sp_top_80 te-page__custom">
<div class="container">
<div class="row">
<?php if( $data->get( 'layout' ) == 'left' ): ?>
<div class="col-xl-3 col-lg-3 col-md-12 col-12">
<?php dynamic_sidebar( $sidebar ); ?>
</div>
<?php endif; ?>
<div class="content-side <?php echo esc_attr( $class ); ?> <?php if ( $data->get( 'layout' ) == 'left' ) echo 'pl-0'; elseif ( $data->get( 'layout' ) == 'right' ) echo ''; ?>">
<div class="blog-page-three-content">
<div class="thm-unit-test">
<?php while ( have_posts() ): the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<div class="clearfix"></div>
<?php
$defaults = array(
'before' => '<div class="paginate-links">' . esc_html__( 'Pages:', 'minimalin' ),
'after' => '</div>',
);
wp_link_pages( $defaults );
?>
<?php comments_template() ?>
</div>
</div>
</div>
<?php if( $data->get( 'layout' ) == 'right' ): ?>
<div class="col-xl-3 col-lg-3 col-md-12 col-12">
<?php dynamic_sidebar( $sidebar ); ?>
</div>
<?php endif; ?>
</div>
</div>
</section><!-- blog section with pagination -->
<?php get_footer(); ?>