<?php
/**
 * Template part for displaying posts.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Theme Palace
 * @subpackage Photoistic
 * @since Photoistic 1.0.0
 */
$class = has_post_thumbnail() ? 'has-post-thumbnail' : 'no-post-thumbnail';
$options = photoistic_get_theme_options();
?>

<article <?php echo esc_attr( $class ); ?>>
    <div class="post-wrapper">
        <div class="featured-image">
            <a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url( 'post-thumbnail' ); ?>" alt="blog"></a>
        </div><!-- .featured-image -->

        <div class="entry-container">
        <?php if( $options['hide_date'] == false ){ ?>
            <div class="entry-meta">
                <span class="posted-on">
                    
                        <time class="entry-date published updated" datetime="2018-04-06T11:33:16+00:00">
                        <?php echo esc_html(get_the_date( 'j', get_the_id() )); ?><br>
                        <?php echo esc_html(get_the_date( 'M', get_the_id() )); ?>
                        </time>
                   
                </span><!-- .posted-on -->
            </div><!-- .entry-meta -->

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

            <?php echo photoistic_author_meta(); ?>
        </div><!-- .entry-container -->
    </div><!-- .post-wrapper -->
</article>