title: Show featured image from shortcode - Currently only have title and excerpt
body: <p>I currently have a function pulled from WPBeginner which allows me to create a shortcode which pulls the stickied posts on the site wherever I want.</p>
  
  <p>I am in need of this to also show the featured image but not sure how to get this to work currently. The current shortcode is below:</p>
  
  <pre><code>function wpb_latest_sticky() { 
  
  /* Get all sticky posts */
  $sticky = get_option( 'sticky_posts' );
  
  /* Sort the stickies with the newest ones at the top */
  rsort( $sticky );
  
  /* Get the 5 newest stickies (change 5 for a different number) */
  $sticky = array_slice( $sticky, 0, 1 );
  
  /* Query sticky posts */
  $the_query = new WP_Query( array( 'post__in' =&gt; $sticky, 'ignore_sticky_posts' =&gt; 1 ) );
  // The Loop
  if ( $the_query-&gt;have_posts() ) {
      $return .= '&lt;ul&gt;';
      while ( $the_query-&gt;have_posts() ) {
          $the_query-&gt;the_post();
          $return .= '&lt;li&gt;&lt;a href="' .get_permalink(). '" title="'  . get_the_title() . '"&gt;' . get_the_title() . '&lt;/a&gt;&lt;br /&gt;' . get_the_excerpt(). '&lt;/li&gt;';
  
      }
      $return .= '&lt;/ul&gt;';
  
  } else {
      // no posts found
  }
  /* Restore original Post Data */
  wp_reset_postdata();
  
  return $return; 
  
  } 
  add_shortcode('latest_stickies', 'wpb_latest_sticky');
  </code></pre>
  
  <p>This is how I pull it on post pages:</p>
  
  <pre><code> &lt;?php if ( has_post_thumbnail() &amp;&amp; !is_search() ) { ?&gt;
              &lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php echo esc_attr( sprintf( esc_html__( 'Permalink to ', 'quark' ) . '%s', the_title_attribute( 'echo=0' ) ) ); ?&gt;"&gt;
                  &lt;?php the_post_thumbnail( 'post_feature_full_width' ); ?&gt;
              &lt;/a&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated!</p>