title: Loop through wp_get_post_terms and echo out taxonomy name
body: <p>I have a custom post type called “project” and a list of 8 CPT categories. On the homepage of my site, I want to call the latest post and echo the project name, excerpt, and category. I have the name and excerpt working, but I cannot figure out how to pull in the custom taxonomy. </p>
  
  <p>I know I can use wp_get_post_terms() to get taxonomy terms assigned to a specific post, but this returns an array of term objects. I don't know how to loop through the return and echo out $term->name each time.</p>
  
  <pre><code>&lt;?php
  $args = array(
      'meta_key'     =&gt; 'featured',
      'meta_value'   =&gt; '1',
      'post_type' =&gt; 'project'
  );
  $query = new WP_Query( $args );
  if ( $query-&gt;have_posts() ) {
  while ( $query-&gt;have_posts() ) {
      $query-&gt;the_post();
      $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post-&gt;ID), 'full' ); ?&gt;
  
      &lt;div class="cpt-feature" style="background: url('&lt;?php echo $backgroundImg[0]; ?&gt;') center center no-repeat; background-size: cover;"&gt;
      &lt;?php echo get_the_post_thumbnail( $page-&gt;ID, 'thumbnail' ); ?&gt;
  
      &lt;?php
      echo "&lt;div class='cpt-overlay'&gt;";
      echo "&lt;div class='project-information'&gt;";
      // NEED TO INSERT CPT CATEGORY HERE
      echo "&lt;h3&gt;";
          the_title();
      echo "&lt;/h3&gt;";
      echo "&lt;p&gt;";
      echo get_field('intro_blurb');
      echo "&lt;p&gt;&lt;a href='" . get_permalink() . "'&gt;View Project&lt;/a&gt;&lt;/p&gt;";
      echo "&lt;/div&gt;";
      echo "&lt;/div&gt;";
      echo "&lt;/a&gt;";
  }
  wp_reset_postdata(); } else { }?&gt;
  </code></pre>