116 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			116 lines
		
	
	
		
			4.6 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Tag Main File.
 | |
|  *
 | |
|  * @package THINKAI
 | |
|  * @author  TonaTheme
 | |
|  * @version 1.0
 | |
|  */
 | |
| 
 | |
| get_header();
 | |
| $options = thinkai_WSH()->option();
 | |
| $search_query = get_search_query();
 | |
| global $wp_query;
 | |
| $data  = \THINKAI\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-xl-8 col-lg-12 col-md-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( 'thinkai_banner', $data );?>
 | |
|     <?php else:?>
 | |
|     <!--Start breadcrumb Style1-->
 | |
|     <section class="breadcrumb-style1 <?php if( $data->get( 'banner' ) ) echo 'm-t130'?>">
 | |
|         <?php if( $data->get( 'banner' ) ){?>
 | |
|             <div id="particles-js"></div>
 | |
|             <div class="breadcrumb-style1-bg" style="background-image: url(<?php echo esc_url( $data->get( 'banner' ) ); ?>);"></div>
 | |
| 		<?php } ?>
 | |
|         
 | |
|         <!--Start Scrolling Text Style6-->
 | |
|         <?php 
 | |
|             $features_list = $options->get('search_features_list');
 | |
|             if(!empty($features_list)){
 | |
|             $features_list = explode("\n", ($features_list)); 
 | |
|         ?>        
 | |
|         <div class="scrolling-text-style6">
 | |
|             <div class="inner">
 | |
|                 <ul class="clearfix marquee_mode">
 | |
|                     <?php foreach($features_list as $features): ?>
 | |
|                     <li data-hover="<?php echo wp_kses($features, true); ?>">
 | |
|                         <?php echo wp_kses($features, true); ?>
 | |
|                     </li>
 | |
|                     <?php endforeach; ?>
 | |
|                 </ul>
 | |
|             </div>
 | |
|         </div>
 | |
|         <?php } ?>
 | |
|         
 | |
|         <!--End Scrolling Text Style6-->
 | |
|         <div class="container">
 | |
|             <div class="inner-content">
 | |
|                 <div class="title text-center">
 | |
|                     <h2><?php if ($data->get('title')) { echo wp_kses($data->get('title'), true); } else { echo esc_html('Search Results for: ') . esc_html($search_query); } ?></h2>
 | |
|                 </div>
 | |
|             </div>
 | |
|         </div>
 | |
|     </section>
 | |
|     <!--End breadcrumb Style1-->
 | |
|     <?php endif;?>
 | |
|     
 | |
|     <!--Start Blog Page Three-->
 | |
|     <section class="blog-page-three">
 | |
|         <div class="container">
 | |
|             <div class="row">
 | |
|                 <?php
 | |
| 					if ( $data->get( 'layout' ) == 'left' ) {
 | |
| 						do_action( 'thinkai_sidebar', $data );
 | |
| 					}
 | |
|                 ?>
 | |
|                 <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">
 | |
| 						<?php if( have_posts() ) : ?>
 | |
|                             <div class="thm-unit-test">
 | |
|                                 <?php
 | |
|                                     while ( have_posts() ) :
 | |
|                                         the_post();
 | |
|                                         thinkai_template_load( 'templates/blog/blog.php', compact( 'data' ) );
 | |
|                                     endwhile;
 | |
|                                     wp_reset_postdata();
 | |
|                                 ?>
 | |
|                             </div>
 | |
|                         
 | |
|                             <!--Pagination-->
 | |
|                     		<div class="pagination-wrapper centred">
 | |
|                             	<?php thinkai_the_pagination( $wp_query->max_num_pages );?>
 | |
|                             </div>
 | |
|                             
 | |
|                         <?php else : ?>
 | |
|                         <div class="thm-sidebar-box default-sidebar">
 | |
|                             <p class="mb-4"><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'thinkai' ); ?></p>
 | |
|                             <?php get_search_form() ?>
 | |
|                         </div>
 | |
|                         <?php endif; ?>
 | |
|                         
 | |
| 					</div>
 | |
|                 </div>
 | |
|                 <?php
 | |
|                     if ( $data->get( 'layout' ) == 'right' ) {
 | |
|                         do_action( 'thinkai_sidebar', $data );
 | |
|                     }
 | |
|                 ?>
 | |
|             </div>
 | |
|         </div>
 | |
|     </section> 
 | |
|     <!--End blog area--> 
 | |
| <?php
 | |
| }
 | |
| get_footer();
 | |
| 
 |