<?php
/**
 * Template part for displaying results in search pages
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package dulcie
 */
$read_more = get_theme_mod( 'dulcie-read-more-text', __( 'Read More', 'dulcie' ));
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<div class="post-heading-wrap">
			<?php the_title( sprintf( '<h2 class="title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
			<?php if ( 'post' === get_post_type() ) : ?>
				<!-- Post Details -->
				<ul class="post-details">
					<li><i class="fa fa-calendar"></i><?php dulcie_posted_on(); ?></li>
					<li><i class="fa fa-tags"></i><?php dulcie_entry_meta(); ?></li>
					<li><a href="<?php echo esc_url( get_comments_link() ); ?>"><i class="fa fa-comment" aria-hidden="true"></i><?php comments_number(); ?></a></li>
				</ul>
				<!-- End Post Details -->
			<?php endif; ?>
		</div>
		<div class="post-content">
			<div class="the-excerpt">
				<?php the_excerpt(); ?>
			</div><!-- .entry-summary -->

			<?php
			if ( ! empty( $read_more ) ) {
				?>
				<div class="more-btn">
					<a href="<?php the_permalink(); ?>" class="btn btn-outline-custom"><?php echo esc_html( $read_more ); ?><i class="fa fa-arrow-right ml-2"></i></a>
				</div>
				<?php
			}
		?>
		</div>
	
</article><!-- #post-<?php the_ID(); ?> -->
