title: Get taxonomy name
body: <p>I'm trying to modify a theme that has custom posts with custom taxonomies. At the bottom of the posts it displays a list of other posts (as in &quot;you might also like...&quot;) What I'm trying to do is to filter the posts that are displayed in that area so they match the category of the current post. It's a tour company, I want to display tours on the same area.</p>
  <p>The custom posts have a term/taxonomy (I still don't get this) called &quot;st_tour_type&quot; how can I get the name or value of the current post so then I can filter the ones display in the bottom of the page using that one as a reference?</p>
  <p>At the moment I'm able to filter them manually if input the slug/name for &quot;st_tour_type&quot; but this doesn't make sense</p>
  <pre><code>$args = [                    
     'posts_per_page' =&gt; 4,
     'post_type' =&gt; 'st_tours',
     'st_tour_type' =&gt; 'lerwanda',
  ]; 
  </code></pre>
  <p>I hope you get what I need, it's my first time working with taxonomies...</p>
  <p>Update (23Nov):
  Here's more of the original code</p>
  <pre><code>$search_tax_advance = st()-&gt;get_option( 'attribute_search_form_tour', 'st_tour_type' );
  $terms_posts = wp_get_post_terms(get_the_ID(),$search_tax_advance);
  $arr_id_term_post = array();
  foreach($terms_posts as $term_post){
     $arr_id_term_post[] = $term_post-&gt;term_id;
  }        
  $args = [                    
     'posts_per_page' =&gt; 4,
     'post_type' =&gt; 'st_tours',
     'post_author' =&gt; get_post_field('post_author', get_the_ID()),  
     'post__not_in' =&gt; [$post_id],
     'orderby' =&gt; 'rand',
     'tax_query' =&gt; array(
        'taxonomy' =&gt; $search_tax_advance,
        'terms' =&gt; $arr_id_term_post,
        'field' =&gt; 'term_id',
        'operator' =&gt; 'IN'
      ),
  ];
  </code></pre>