search.php (1695B)
1 <?php 2 3 /** 4 * The main template file 5 * 6 * This is the most generic template file in a WordPress theme 7 * and one of the two required files for a theme (the other being style.css). 8 * It is used to display a page when nothing more specific matches a query. 9 * E.g., it puts together the home page when no home.php file exists. 10 * 11 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 12 * 13 * @package welbim 14 */ 15 16 get_header(); 17 18 if (is_active_sidebar('sidebar-1')) : 19 $blog_post_list_class = 'col-lg-8'; 20 else : 21 $blog_post_list_class = 'col-lg-12'; 22 endif; 23 ?> 24 25 <div class="sidebar-page-container"> 26 <div class="auto-container"> 27 <div class="row"> 28 <div class="<?php echo esc_attr($blog_post_list_class); ?> col-md-12 col-sm-12 content-side"> 29 <div class="blog-standard-content"> 30 <?php 31 if (have_posts()) : 32 while (have_posts()) : 33 the_post(); 34 get_template_part('template-parts/blog-layout/blog-standard-content'); 35 endwhile; 36 else : 37 get_template_part('template-parts/content', 'none'); 38 endif; 39 ?> 40 <?php if (get_the_posts_pagination()) : ?> 41 <div class="pagination-wrapper"> 42 <?php 43 the_posts_pagination( 44 array( 45 'mid_size' => 2, 46 'prev_text' => '<i class="far fa-angle-left"></i>', 47 'next_text' => '<i class="far fa-angle-right"></i>', 48 ) 49 ); 50 ?> 51 </div> 52 <?php endif; ?> 53 </div> 54 </div> 55 <?php if (is_active_sidebar('sidebar-1')) { ?> 56 <div class="col-lg-4"> 57 <aside class="sidebar blog-sidebar"> 58 <?php get_sidebar(); ?> 59 </aside> 60 </div> 61 <?php 62 } 63 ?> 64 </div> 65 </div> 66 </div> 67 </div> 68 <?php 69 get_footer();