title: Get Wordpress Featured Image "alt"
body: <p>I'm trying to get a page's featured image alt and echo it as paragraph text but my code doesn't seem to be working.</p>
  
  <p>I'm currently able to echo the image and it's working perfectly.</p>
  
  <p>Here's the code I'm using:</p>
  
  <pre><code>    &lt;?php
      get_header(); ?&gt;
        &lt;/div&gt;
      &lt;?php /* The loop */ ?&gt;
      &lt;?php while ( have_posts() ) : the_post(); ?&gt;
      &lt;div class="header-image"&gt;
  
      &lt;?php echo get_the_post_thumbnail($page-&gt;ID, 'full'); ?&gt; 
      
      &lt;?php $alt = get_post_meta( $attachment_img-&gt;ID, '_wp_attachment_image_alt', true ); ?&gt;
      
      &lt;p&gt;&lt;?php echo $alt; ?&gt;&lt;/p&gt;
      
      &lt;/div&gt;
  </code></pre>