I'm looking for a way (preferably a straight up plugin) that can replace my category names (blogroll, film, news, etc...) with thumbnail images. That is, replace the text with small images. Anybody know anything about this?
I'm looking for a way (preferably a straight up plugin) that can replace my category names (blogroll, film, news, etc...) with thumbnail images. That is, replace the text with small images. Anybody know anything about this?
just a bump, as I'd like to be able do this as well.
Fiddle with your theme. Doesn't need a plugin.
In your theme, look for where the_category() gets called. Replace with something like this (modify as needed). I'm assuming (and strongly recommending) that your images use the category's slug as the filename.
Background reading: http://codex.wordpress.org/Template_Tags/get_the_category
<?php
foreach((get_the_category()) as $cat) {
echo '<img src="http://example.com/path-to-images/' . $cat->category_nicename . '.jpg" width="20" height="20" alt="' . $cat->cat_name . '" /> ';
} ?>
Modify width and height as needed.
This topic has been closed to new replies.