Anonymous User 9055193
(@anonymized-9055193)
Please read up on WP_Query. You will love it!
Example:
$args = array(
'post_type' => 'post',
'tax_query' => array(
array(
'taxonomy' => 'people',
'field' => 'slug',
'terms' => 'bob',
),
),
);
$query = new WP_Query( $args );
Your specific case: Taxonomy Parameters
Cheers
Thanks. More reading… great, just what I need. 😉
Meantime, this seems to work:
<?php
$terms = get_terms("host");
$count = count($terms);
if ( $count > 0 ){
echo "<ul>";
foreach ( $terms as $term ) {
$termlinks= get_term_link($term,$taxonomy);
?> <a href="<?php echo $termlinks; ?>">
<?php echo "<li>" . $term->name . "</li>"; ?></a><?php
}
echo "</ul>";
}
?>
And I now know that the items in a taxonomy are correctly called ‘terms’.
Oh, joy. My brain can’t stop smiling. Now, where did I leave the life I used to have?
Anonymous User 9055193
(@anonymized-9055193)
Haha! Yes, read read read read. Terms with a custom WP_Query can be fun in a geeky way. But once you master it, the sky’s the limit! Glad you found a solution.