title: Wordpress get_the_terms for custom Taxonomy
body: <p>Within an archive page, I'm trying to show the a custom taxonomy (called location) along with each post title, category and tag. I can't get the 'get_the_terms' to work.</p>
  
  <p>The post title, category and tag is working perfectly. The taxonomy doesn't work. </p>
  
  <pre><code>&lt;div class="post-listing"&gt;
          &lt;h4&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h4&gt;
          &lt;p&gt;&lt;?php foreach((get_the_category()) as $category) { echo $category-&gt;cat_name . ' '; } ?&gt;&lt;/p&gt;
          &lt;p&gt;&lt;?php $tags = get_the_tags(); foreach($tags as $tag) { echo "$tag-&gt;name"; } ?&gt;&lt;/p&gt;
          &lt;p&gt;&lt;?php $terms = get_the_terms( 'locations' ); foreach($terms as $term) { echo "$term-&gt;name"; } ?&gt;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is my functions.php code.</p>
  
  <pre><code>//hook into the init action and call create_locations_nonhierarchical_taxonomy when it fires
      add_action( 'init', 'create_locations_nonhierarchical_taxonomy', 0 );
      function create_locations_nonhierarchical_taxonomy() {
      // Labels part for the GUI
        $labels = array(
          'name' =&gt; _x( 'Locations', 'taxonomy general name' ),
          'singular_name' =&gt; _x( 'Location', 'taxonomy singular name' ),
          'search_items' =&gt;  __( 'Search Locations' ),
          'popular_items' =&gt; __( 'Popular Locations' ),
          'all_items' =&gt; __( 'All Locations' ),
          'parent_item' =&gt; null,
          'parent_item_colon' =&gt; null,
          'edit_item' =&gt; __( 'Edit Location' ), 
          'update_item' =&gt; __( 'Update Location' ),
          'add_new_item' =&gt; __( 'Add New Location' ),
          'new_item_name' =&gt; __( 'New Location Name' ),
          'separate_items_with_commas' =&gt; __( 'Separate locations with commas' ),
          'add_or_remove_items' =&gt; __( 'Add or remove locations' ),
          'choose_from_most_used' =&gt; __( 'Choose from the most used locations' ),
          'menu_name' =&gt; __( 'Locations' ),
        ); 
      // Now register the non-hierarchical taxonomy like tag
        register_taxonomy('locations','post',array(
          'hierarchical' =&gt; false,
          'labels' =&gt; $labels,
          'show_ui' =&gt; true,
          'show_admin_column' =&gt; true,
          'update_count_callback' =&gt; '_update_post_term_count',
          'query_var' =&gt; true,
          'rewrite' =&gt; array( 'slug' =&gt; 'location' ),
        ));
      }
  </code></pre>
  
  <p>Any ideas? It's driving me mad!</p>