How do I get the_tags() to output each tag so that it comes assigned with a unique class selector? So for example: the_tags() currently outputs something like this:
<a href="http://myblog.com/tag/kittens" rel="tag">kittens</a>
However, I’d like to output something like this:
<a href="http://myblog.com/tag/kittens" rel="tag" class="tag-kittens">kittens</a>
Is it possible to do this? If so, how? Thanks!
It worked, thank you! This is what I did:
Also you can overload working of
get_the_tags();
function.Just add next code to your
functions.php
theme file:this code from http://www.lawturn.com
Use get_the_tags instead, do a for loop and create your own markup.