<?php get_header(); ?>
<?php get_template_part( 'wrapper' ,  'start' ); ?>
	<section class="nyma-search-result">
			<header class="nyma-page-header">
				<h4 class="nyma-page-title">
					<?php printf(esc_html('Search Results for :  %s ', 'nysu-magazine'),  '<i>'. get_search_query() . '</i> '); ?>
				</h4>
			</header>
	</section><!-- .error-404 -->
<?php
	if ( have_posts() ) {
		
		while ( have_posts() ) : the_post(); 
			get_template_part( 'template-parts/block/block', '1' );
			nysu_magazine_block_space();
		endwhile;
		
		the_posts_pagination();
	} else { ?>
		
		<section class="nyma-error-404 not-found">
			<div class="nyma-page-content-404">
				<header class="nyma-page-header-404 text-center">
					<h4 class="nyma-page-title-404">
					<?php printf('<span class="nyma-widget-title-inner">'. esc_html__('It looks like nothing was found at this location.', 'nysu-magazine'), '</span>'); ?>
					</h4>
				</header>
				<p class="text-center"><?php esc_html_e( 'Maybe try another a search?', 'nysu-magazine' ); ?></p>

				<div class="text-center"><?php get_search_form(); ?><div class="clearfix"></div></div>
			</div><!-- .page-content -->
		</section><!-- .error-404 -->
		
		
	<?php	
	}
?>
<?php get_template_part( 'wrapper' , 'end' ); ?>
<?php get_footer(); ?>