I have the following question. For a project i am working on i am using get_the_term_list to echo all terms from a particular post and taxonomy. No i need to be able to style every term that gets echoed out a different way. For this to work i would like to add the term->slug as a class to the list item, but im not able to make this work. I know how to add the slugs to the ul but thats not what i need because then i am not able to style the individual list items based on their slug.
so at this point i am using this to get all the terms based on the current post:
<?php echo get_the_term_list( $post->ID, 'thema', '<ul class="project-themes no-bullet"><li>', '</li><li>', '</li></ul>' ); ?>
Does someone have a clue how to get the slug of the terms as a class on the li. So i get something like this:
<?php echo get_the_term_list( $post->ID, 'thema', '<ul class="project-themes no-bullet"><li class="term->slug">', '</li><li class="term->slug">', '</li></ul>' ); ?>
Hope someone can help me with this.