J M
(@hiphopinenglish)
This thread has something that I think is what you want.
Thread.
It’s getting closer, but that specific piece of code gets the posts out of CPT or Taxonomy. I want to get all the taxonomies out of CPT.
With the following code I can get the taxonomies in a list, any idea how to attach a description of a taxonomy to that?
?php
$taxonomy = 'subproject';
$queried_term = get_query_var($taxonomy);
$terms = get_terms($taxonomy, 'slug='.$queried_term);
if ($terms) {
echo '<ul>';
foreach($terms as $term) {
echo '<li><a href="'.get_term_link($term->slug, $taxonomy).'">'.$term->name.'</a></li>';
}
echo '</ul>';
}
?>
J M
(@hiphopinenglish)
I think you need to call description inside your foreach part of the loop. It should be simple enough with Get Terms.