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

$theme_options  = wacko_theme_options();

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<header class="entry-header page-header">
		<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>

		<?php if ( 'post' === get_post_type() ) : ?>
		<?php if( 1 === $theme_options['enable_post_date'] || 1 === $theme_options['enable_post_author'] ) { ?>
		<div class="entry-meta">
			<?php wacko_posted_on(); ?>
		</div><!-- .entry-meta -->
		<?php
			}
		endif; ?>
	</header><!-- .entry-header -->

	<div class="entry-summary">

		<?php the_excerpt(); ?>

		<a href="<?php the_permalink(); ?>" class="btn btn-default read-more">
			<?php echo esc_html__( 'Continue reading', 'wacko' ); ?>
		</a>

	</div><!-- .entry-summary -->

	<?php if( 1 === $theme_options['enable_post_meta'] ) { ?>

	<footer class="entry-footer">
		<?php wacko_entry_footer(); ?>
	</footer><!-- .entry-footer -->

	<?php } ?>

</article><!-- #post-<?php the_ID(); ?> -->
