<?php
/**
 * Template part for displaying results in search pages
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Social_Charity
 */

?>

<div class="col-sm-6">
	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<div class="b-card">
			<a href="#" class="img-holder">
				<?php social_charity_post_thumbnail(); ?>
			</a>
			<div class="b-body">
				<?php if ( 'post' === get_post_type() ) :?>
				<div class="b-date">
					<span class="num"><?php echo esc_html(get_post_time('j'));?></span>
					<span class="month"><?php echo esc_html(get_post_time('F'));?></span>
				</div>
				<?php endif; ?>
				<div class="text">
					<?php
					if ( is_singular() ) :
						the_title( '<h4 class="entry-title">', '</h4>' );
					else :
						the_title( '<h4 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h4>' );
					endif;?>
					<?php the_excerpt();?>
				</div>
			</div>
		</div>
	</article><!-- #post-<?php the_ID(); ?> -->
</div>
