I am looking for a way to add tag slug as a class.
I can’t figure out how to achieve this…
Here is how I display the products tags
<?php echo get_the_term_list( $post->id, 'product_tag'); ?>
The output is
<a href="http://myurl.com" rel="tag">My tag</a>
And I want
<a href="http://myurl.com" class="Tag_Slug" rel="tag">My tag</a>
I think you should use a custom loop:
Why can’t you wrap the output in an unordered list something like below?