<?php
/**
 * Template part for displaying results in search pages.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package StoreX
 */

?>
<div id="post-<?php the_ID(); ?>" <?php post_class('news-block-one post-grid post-single'); ?>>
	<div class="inner-box">
		<?php if ( has_post_thumbnail() ) : ?>
			<div class="image-box">
				<figure class="image"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php the_post_thumbnail(); ?></a></figure>
				</div>
			<?php endif; ?>	
			<div class="lower-content">
				<ul class="post-info">
					<li class="category"><?php the_category(' '); ?></li>
					<li class="author"><?php esc_html_e('By','storex'); ?> <a href="<?php echo esc_url(get_author_posts_url( get_the_author_meta( 'ID' ) ));?>"><?php echo esc_html( get_the_author() ); ?></a></li>
				</ul>
				<?php 
				if ( is_single() ) :

					the_title('<h3 class="post-title">', '</h3>' );

				else:

					the_title( sprintf( '<h3 class="post-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' );

				endif; 
				?>
			</div>
		</div>
	</div>