I'm trying to mark up my posts using their custom taxonomy slug as the div class so that they can be filtered...
So far what I have displays the taxonomy name but what I need is the slug so I have a nice-space-free-name, I have the below so far outputting the name:
<div class="box-item cocktails-box
<?php $terms_as_text = strip_tags( get_the_term_list( $wp_query->post->ID, 'cocktail_type', '', ' ', '' ) );
echo $terms_as_text; ?>">
Any help would be much appreciated - I'm getting a bald patch from scratching my head on this..