title: Wordpress need to add parent Category (custom taxonomy) to items
body: <p>I am working on a Wordpress website using a custom post type and custom taxonomy(tour-category).</p>
  
  <p>I am making changes to the search filters the below bit of code pulls in the taxonomies(tour-category) and displays them so you can filter them on and off to update the search.</p>
  
  <p>I have managed to add the category slug to the div class but really I need them to display the <strong>parent</strong> taxonomy(tour-category). on the div class for each of the filter items.</p>
  
  <p>So I can target any taxonomy(tour-category) under a specific parent using CSS as I want to be able to hide none relevant ones, without having to hide them one by one I will just target all that are under a parent.</p>
  
  <p>Hope someone can help :-)</p>
  
  <p>Thanks
  Lee</p>
  
  <pre><code>&lt;?php if(is_array($tour_types) &amp;&amp; count($tour_types) &amp;&amp; $show_tour_types) : ?&gt;
     &lt;?php foreach($tour_types as $type) : ?&gt;
          &lt;?php
          $checked = in_array($type-&gt;slug, $checked_types);
          $checked_attr = $checked ? 'checked' : '';
          ?&gt;
  
      &lt;div class="mkdf-tours-type-filter-item &lt;?php echo esc_attr($type-&gt;slug); ?&gt;"&gt;
          &lt;input &lt;?php echo esc_attr($checked_attr); ?&gt; type="checkbox" id="mkdf-tour-type-filter-&lt;?php echo esc_attr($type-&gt;slug); ?&gt;" name="type[]" value="&lt;?php echo esc_attr($type-&gt;slug); ?&gt;"&gt;
          &lt;label for="mkdf-tour-type-filter-&lt;?php echo esc_attr($type-&gt;slug); ?&gt;"&gt;
              &lt;span&gt;
                  &lt;?php echo esc_html($type-&gt;name); ?&gt;
              &lt;/span&gt;
          &lt;/label&gt;
      &lt;/div&gt;
  &lt;?php endforeach; ?&gt;
  </code></pre>