<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<div class="eltdf-post-content">
	        <?php if ( has_post_thumbnail() ) { ?>
		        <div class="eltdf-post-image">
			        <a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
				        <?php the_post_thumbnail( 'thumbnail' ); ?>
			        </a>
		        </div>
	        <?php } ?>
	        <div class="eltdf-post-title-area <?php if ( ! has_post_thumbnail() ) { echo esc_attr( 'eltdf-no-thumbnail' ); } ?>">
		        <div class="eltdf-post-title-area-inner">
			        <h5 itemprop="name" class="eltdf-post-title entry-title">
				        <a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
			        </h5>
			        <?php
			        $eltdf_my_excerpt = get_the_excerpt();

			        if ( ! empty( $eltdf_my_excerpt ) ) { ?>
				        <p itemprop="description" class="eltdf-post-excerpt"><?php echo wp_trim_words( esc_html( $eltdf_my_excerpt ), 30 ); ?></p>
			        <?php } ?>
                    <div class="eltdf-post-read-more-button">
                        <a itemprop="url" href="<?php echo get_the_permalink(); ?>" target="_self" class="eltdf-btn eltdf-btn-medium eltdf-btn-simple eltdf-blog-list-button">
                            <span class="eltdf-btn-text"><?php esc_html_e( 'Zobacz', 'calla' ); ?></span>
                        </a>
                    </div>
		        </div>
	        </div>
        </div>
    </article>
<?php endwhile; ?>
<?php else: ?>
	<p class="eltdf-blog-no-posts"><?php esc_html_e( 'No posts were found.', 'calla' ); ?></p>
<?php endif; ?>