Hey everyone,
I’m editing the twenty eleven theme but I want to change the categories so they display the icons as a @fontface icon instead of a word.
The categories needs to look something like this (using an art category as an example):
<a href="THELINKINHERE" rel="category" title="View all categories in Art"><i class="icon-brush"></i></a>
However this is how it currently looks.
<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span><a href="THELINKINHERE" rel="category" title="View all categories in Art">Art</a>
Here is what my code is at the moment:
<?php $show_sep = false; ?>
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
if ( $categories_list ):
?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true; ?>
</span>
<?php endif;?>
<?php endif; // End if categories ?>
The <i class="icon-heart-empty"></i> class needs to change depending on what post category is set is there a way to manually set what icon links to which category?
Thanks for your help!
Megan