<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<div class="qodef-post-content">
	        <?php if ( has_post_thumbnail() ) { ?>
		        <div class="qodef-post-image">
			        <a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
				        <?php the_post_thumbnail( 'thumbnail' ); ?>
			        </a>
		        </div>
	        <?php } ?>
	        <div class="qodef-post-title-area <?php if ( ! has_post_thumbnail() ) { echo esc_attr( 'qodef-no-thumbnail' ); } ?>">
		        <div class="qodef-post-title-area-inner">
			        <h5 itemprop="name" class="qodef-post-title entry-title">
				        <a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
			        </h5>
		        </div>
	        </div>
        </div>
    </article>
<?php endwhile; ?>
<?php else: ?>
	<p class="qodef-blog-no-posts"><?php esc_html_e( 'No posts were found.', 'peggi' ); ?></p>
<?php endif; ?>