You can use a tax query for all “Reference Type” terms, which will retrieve all attachments that have at least one “Reference Type” term.
$rt_media = new WP_Query(
array(
'posts_per_page' => -1,
'post_type' => 'attachment',
'tax_query' => array(
array(
'taxonomy' => 'reference_type',
'terms' => get_terms(
'reference_type',
array(
'hide_empty' => false,
'fields' => 'ids',
)
)
)
)
)
);
while ( $rt_media->have_posts() ) : $rt_media->the_post(); ?>
<div class="item">
Use any template tags you want to output the list!
</div>
<?php endwhile ?>