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

?>

<article id="post-<?php the_ID(); ?>" <?php post_class( 'mb-5 border-bottom pb-4' ); ?>>
	<header class="entry-header mb-3">
		<?php the_title( sprintf( '<h2 class="entry-title h4"><a href="%s" rel="bookmark" class="text-decoration-none text-dark hover-primary">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>

		<?php if ( 'post' === get_post_type() ) : ?>
		<div class="entry-meta text-secondary fs-7">
			<?php
			zentorone_posted_on();
			?>
		</div><!-- .entry-meta -->
		<?php endif; ?>
	</header><!-- .entry-header -->

    <?php if ( has_post_thumbnail() ) : ?>
        <div class="post-thumbnail mb-3">
            <a href="<?php the_permalink(); ?>">
                <?php the_post_thumbnail( 'medium', array( 'class' => 'img-fluid rounded' ) ); ?>
            </a>
        </div>
    <?php endif; ?>

	<div class="entry-summary">
		<?php the_excerpt(); ?>
	</div><!-- .entry-summary -->

	<footer class="entry-footer">
        <a href="<?php echo esc_url( get_permalink() ); ?>" class="btn btn-sm btn-outline-primary mt-2">
            <?php esc_html_e( 'Read More', 'zentorone' ); ?>
        </a>
	</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->
