<?php
$logo = get_field('partner_logo');
$url = get_field('partner_url');
?>
<article <?php post_class(); ?>>
  <figure>
    <?php if($url) echo '<a href="'.esc_url($url).'" title="'.get_the_title().'" target="_blank">';
      echo '<img src="'.$logo['sizes']['medium'].'" class="img-responsive " alt="'.get_the_title().'" title="'.get_the_title().'" longdesc="'.get_the_title().'"/>';
    if($url) echo '</a>'; ?>
    </a>
  </figure>
</article><!--post-class-->
