Support » Themes and Templates » adding category to link class

  • Hi, I want to have icons next to each internal link that shows what category of post that link is going to take you to.

    To do this I want to add a class to the link code, so instead of

    <a href="xxx">xxx</a>, I get

    <a class="categoryname">xxx</a>.

    Where categoryname is dynamically worked out for each internal link.

    Possible? I’ve searched the internet and plugins for 30 minutes and not found anything to do this ‘out of the box’. However, it seems like
    a pretty easy hack to me.


Viewing 1 replies (of 1 total)
  • What do you mean by ‘internal link’? Are you talking about pages? Category, tag or date archives? All of it? Are you doing this in the sidebar, in the header, inside the Loop?

    Also, got an URL? It helps if you do.

Viewing 1 replies (of 1 total)
  • The topic ‘adding category to link class’ is closed to new replies.