/home/awneajlw/www/decenttraders.online/wp-content/themes/minimalin/search.php
<?php
/**
 * Tag Main File.
 *
 * @package MINIMALIN
 * @author  TonaTheme
 * @version 1.0
 */

get_header();
$search_query = get_search_query();
global $wp_query;
$data  = \MINIMALIN\Includes\Classes\Common::instance()->data( 'search' )->get();
$layout = $data->get( 'layout' );
$sidebar = $data->get( 'sidebar' );
$layout = ( $layout ) ? $layout : 'right';
$sidebar = ( $sidebar ) ? $sidebar : 'default-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';
if ( class_exists( '\Elementor\Plugin' ) AND $data->get( 'tpl-type' ) == 'e' AND $data->get( 'tpl-elementor' ) ) {
	echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $data->get( 'tpl-elementor' ) );
} else {
	
?>

<?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">
    <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 ); ?>">
				<div class="blog-page-three-content">
					<?php if( have_posts() ) : ?>
						<div class="thm-unit-test">
							<?php
								while ( have_posts() ) :
									the_post();
									minimalin_template_load( 'templates/blog/blog.php', compact( 'data' ) );
								endwhile;
								wp_reset_postdata();
							?>
						</div>
					
						<hr>

                    	<div class="pagination__wraper text-center sp_top_40">
							<?php minimalin_the_pagination( $wp_query->max_num_pages );?>
						</div>
						
					<?php else : ?>
					<div class="sidebar-box-style1 sidebar-box-style1--style2 default-sidebar">
						<p class="mb-4"><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'minimalin' ); ?></p>
						<?php get_search_form() ?>
					</div>
					<?php endif; ?>
					
				</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> 
<!--End blog area--> 
<?php
}
get_footer();