<?php if ( have_posts() ) : ?>
    <div class="block fullwidth background-grey background-map mb0">
        <?php if ( ! empty( $instance['title'] ) ) : ?>             
            <h1 class="center"><?php echo esc_attr( $instance['title'] ); ?></h1>
        <?php endif; ?>

        <div class="partners row">
            <?php while( have_posts() ) : the_post(); ?>                    
                <?php if ( has_post_thumbnail() ) : ?>
                    <div class="partner-item col-sm-3 col-md-2">
                        <?php $url = get_post_meta( get_the_ID(), REALIA_PARTNER_PREFIX . 'url', true ); ?>
                        <a href="<?php echo esc_url( $url ); ?>">
                            <?php the_post_thumbnail(); ?>
                        </a>
                    </div><!-- /.partner-item -->
                <?php endif; ?>                    
            <?php endwhile; ?>
        </div><!-- /.row -->
    </div><!-- /.block -->
<?php endif; ?>