<?php
/**
 * Class Medify_Content_Search_Page
 * 
 * @package IS-Medify
 * 
 * @since 1.0.0
 *  
*/
class Medify_Content_Search_Page {

	/**
	 * Class Construct Method.
	*/
	public function __construct() {
		$this->IS_Medify_Setup_Hook_Search_page();
	}

	/**
	 * IS_Medify_Setup_Hook_Search_page Function For Search Page.
	*/
	public function IS_Medify_Setup_Hook_Search_page() {
		add_action( 'IS_Medify_Do_Function_Search', array( $this, 'IS_Medify_Search_Page' ) );
	}

	/**
	 * IS-Medify Search Page.
	*/
	public function IS_Medify_Search_Page() { ?>
		<div class="container-fluid space" id="primary">
			<div class="container blogs">
				<div class="col-md-9 rightside">
					<div <?php post_class();?>>		
						<?php 
						if ( have_posts()): 
							while ( have_posts() ): the_post(); 
							    				/**
								/** Run the loop for the search to output the results.
								 * If you want to overload this in a child theme then include a file
								 * called content-search.php and that will be used instead.
								*/
								get_template_part( 'template-parts/content', 'search' );

							endwhile; 
						else:
						    get_template_part( 'template-parts/content', 'none' );
						endif; 
						?>
						<div class="text-center wl-theme-pagination">
			                <?php echo esc_html( the_posts_pagination( array( 'mid_size' => 2 ) ) ); ?>
			                <div class="clearfix"></div>
			            </div>
					</div>
				</div>
				<?php get_sidebar(); ?>
			</div>
		</div>>
		<?php
	}
}
new Medify_Content_Search_Page;