title: Displaying Custom Post Type's taxonomy
body: <p>I'm currently building my first wordpress theme and I want to display a custom post type's taxonomy (but only the name, <strong>not the link</strong>) on its preview as well as the date it was published.</p>
  
  <p>I've been looking around but only found that I should use the <strong>get_terms()</strong> functions but than displays all taxonomies, and I want to display the selected category for my post.</p>
  
  <p>Please keep in mind that I'm only a beginner at this so you'll have to be pretty clear :)</p>
  
  <p>Here is the loop :</p>
  
  <pre><code>&lt;?php $loop = new WP_Query( array( 'post_type' =&gt; 'projets', 'posts_per_page' =&gt; '1' ) ); ?&gt;
      &lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;
          &lt;?php the_title() ?&gt;
          &lt;span&gt;**SHOW CREATION DATE AND CATEGORY HERE**&lt;/span&gt;
      &lt;?php endwhile; wp_reset_query(); ?&gt;
  </code></pre>
  
  <p>And here is the code for custom post type and taxonomy</p>
  
  <pre><code>// Custom post types FOLIO
  function custom_post_type() {
  
  // Set UI labels for Custom Post Type
  $labels = array(
      'name'                =&gt; _x( 'Projets', 'Post Type General Name', 'connivence' ),
      'singular_name'       =&gt; _x( 'Projet', 'Post Type Singular Name', 'connivence' ),
      'menu_name'           =&gt; __( 'Projets', 'connivence' ),
      'parent_item_colon'   =&gt; __( 'Projet parent ', 'connivence' ),
      'all_items'           =&gt; __( 'Tous les projets', 'connivence' ),
      'view_item'           =&gt; __( 'Voir', 'connivence' ),
      'add_new_item'        =&gt; __( 'Ajouter un projet', 'connivence' ),
      'add_new'             =&gt; __( 'Ajouter', 'connivence' ),
      'edit_item'           =&gt; __( 'Editer', 'connivence' ),
      'update_item'         =&gt; __( 'Mettre à jour', 'connivence' ),
      'search_items'        =&gt; __( 'Recherche', 'connivence' ),
      'not_found'           =&gt; __( 'Not Found', 'connivence' ),
      'not_found_in_trash'  =&gt; __( 'Not found in Trash', 'connivence' ),
  );
  
  // Set other options for Custom Post Type
  $args = array(
      'label'               =&gt; __( 'Projets', 'connivence' ),
      'description'         =&gt; __( 'Portfolio et projets', 'connivence' ),
      'labels'              =&gt; $labels,
      'supports'            =&gt; array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields', ),
      'hierarchical'        =&gt; false,
      'public'              =&gt; true,
      'show_ui'             =&gt; true,
      'show_in_menu'        =&gt; true,
      'show_in_nav_menus'   =&gt; true,
      'show_in_admin_bar'   =&gt; true,
      'menu_position'       =&gt; 5,
      'can_export'          =&gt; true,
      'has_archive'         =&gt; true,
      'exclude_from_search' =&gt; false,
      'publicly_queryable'  =&gt; true,
      'capability_type'     =&gt; 'page',
      'menu_icon'           =&gt; 'dashicons-welcome-learn-more',
  );
  
  // Registering your Custom Post Type
  register_post_type( 'Projets', $args );
  
  // Registering your Custom Taxonomy
  register_taxonomy( 'categories-projets', array('projets'), array(
      'hierarchical' =&gt; true, 
      'label' =&gt; 'Catégories', 
      'singular_label' =&gt; 'Catégorie', 
      'rewrite' =&gt; array( 'slug' =&gt; 'projets', 'with_front'=&gt; false )
      )
  );
  </code></pre>
  
  <p>Thank you for you help !</p>