<?php
/*
* The Template for displaying all posts
*
*/
$logistek_redux_demo = get_option('redux_demo');
get_header(); ?>
<?php if(isset($logistek_redux_demo['blog_image']['url']) && $logistek_redux_demo['blog_image']['url'] != ''){?>
<section class="page-title-section" style="background-color: #f8f8f8;
background-image: url(<?php echo esc_url($logistek_redux_demo['blog_image']['url']);?>);
color: #fff;">
<?php }else{?>
<section class="page-title-section" style="background-color: #f8f8f8;
background-image: url(<?php echo get_template_directory_uri();?>/assets/images/bg/page-title-bg.jpg);
color: #fff;">
<?php } ?>
<div class="container">
<div class="row">
<div class="col-xl-12 text-center">
<div class="page-title-content">
<h3 class="title text-white"><?php printf( esc_html__( 'Search Results for: %s', 'logistek' ), get_search_query() ); ?></h3>
</div>
</div>
</div>
</div>
</section>
<!-- Page Title End -->
<!-- Service Details Section Start -->
<div class="service-details-page pdt-110 pdb-90">
<div class="container">
<div class="row">
<div class="col-xl-8 col-lg-7">
<div class="row">
<?php if ( have_posts() ) :
while (have_posts()): the_post();
?>
<div class="news-wrapper mrb-50 mrb-sm-40">
<?php if (has_post_thumbnail()) { ?>
<div class="news-thumb">
<img class="img-full" src="<?php echo wp_get_attachment_url(get_post_thumbnail_id());?>" alt="">
</div>
<?php } ?>
<div class="news-details pdt-25">
<div class="news-description mb-20">
<div class="news-bottom-meta mrb-15">
<span class="entry-author mrr-20"><i class="far fa-user mrr-10 text-primary-color"></i><?php the_author_posts_link(); ?></span>
<span class="entry-date"><i class="far fa-calendar-alt mrr-10 text-primary-color"></i><?php the_time(get_option( 'date_format'));?></span>
</div>
<h4 class="the-title mrb-20"><a href="<?php the_permalink();?>"><?php the_title();?></a></h4>
<p class="the-content"><?php if(isset($logistek_redux_demo['blog_excerpt'])){?>
<?php echo esc_attr(logistek_excerpt($logistek_redux_demo['blog_excerpt'])); ?>
<?php }else{?>
<?php echo esc_attr(logistek_excerpt(40));
}
?></p>
</div>
<div class="news-link">
<a href="<?php the_permalink();?>"><?php if(isset($logistek_redux_demo['read_more'])){?>
<?php echo htmlspecialchars_decode(esc_attr($logistek_redux_demo['read_more']));?>
<?php }else{?>
<?php echo esc_html__( 'Read more', 'logistek' );
}
?> <i class="fal fa-long-arrow-right"></i></a>
</div>
</div>
</div>
<?php endwhile; else :?>
<div class="search-custom" ><h4><?php
// If no content, include the "No posts found" template.
echo esc_html__( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'logistek' ) ;?></h4>
<?php get_search_form(); ?>
</div>
<?php endif;?>
</div>
<div class="row">
<div class="col-xl-12">
<nav class="pagination-nav pdt-30">
<?php logistek_pagination();?>
</nav>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-5 sidebar-right">
<aside class="news-sidebar-widget">
<?php get_sidebar();?>
</aside>
</div>
</div>
</div>
</div>
<?php
get_footer();
?>