title: Show featured image on 'Posts Page' in Wordpress
body: <p>So for all of the other pages on my wordpress site I am able to display the featured image for the page. However, on the page that all of my posts are displayed the featured image does not display even if it is set.</p>
  
  <p>Here is the code I am using to display the featured image on all other pages.</p>
  
  <pre><code>&lt;?php if ( has_post_thumbnail() ): {
      $src = wp_get_attachment_url(get_post_thumbnail_id($post-&gt;ID));
  }?&gt;
  
  &lt;div class="featured-image-full-width" style="background-image: url( &lt;?php echo $src; ?&gt; ) !important; height: 400px; background-size: cover; background-repeat: no-repeat; background-position: center;"&gt;&lt;/div&gt;
  
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>This does not work on the page that is chosen to display posts though. Keep in mind that I need to display the featured image as a background image so that it is full width of the page and not stretched. (IE and Edge don't support "object-position" so this is my way of working around that)</p>
  
  <p>Let me know if anything is not clear.</p>