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

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<div class="post-item">
      	<?php if(has_post_thumbnail()):?>
	        <div class="featured-image" style="background-image: url('<?php the_post_thumbnail_url( 'full' ); ?>');">
                <a href="<?php the_permalink();?>" class="post-thumbnail-link"></a>
            </div><!-- .featured-image -->
    	<?php endif; ?>

    	<div class="entry-container">
	        <header class="entry-header">
				<h2 class="entry-title">
					<a href="<?php the_permalink();?>"><?php the_title();?></a>
				</h2>
	        </header>

	        <div class="entry-content">
				    <?php
					$excerpt = rock_studio_the_excerpt( 20 );
					echo wp_kses_post( wpautop( $excerpt ) );
				?>
	        </div><!-- .entry-content -->

	        <div class="entry-meta">
				<?php rock_studio_entry_meta(); ?>
    			<?php rock_studio_posted_on(); ?>
			</div><!-- .entry-meta -->
        </div><!-- .entry-container -->
    </div><!-- .post-item -->
</article><!-- #post-## -->
