Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a way to assign an icon to a category post as well as the posts original image that's set in the featured images?

So if had a post about grapes I would have an image of some grapes in the thumbnail but I'd also have a grape icon from the grapes category attached to the preview post. This is an example of what I mean http://wordpress.thebebel.com/showcase/bloggaexport/

Thanks

share|improve this question

4 Answers 4

As far as I can see from the link you mentioned, there are no icons for categories, only avatars for authors. Is that what you mean? If you do want category icons, take a look at some plugins in the WordPress.org directory. Here's an example: http://wordpress.org/extend/plugins/category-icons/

share|improve this answer
    
Sorry that's probably me misinterpreting that author avatars as categories. Thanks for the links I'll check those out if I can't do Miha's suggestion. –  a_knife_a_fork Oct 10 '12 at 10:18

You could do that in template. Have an array of $category_icons = (category_id => url_to_icon,…) and then where you want to show the icon, you just use <img src="<?$category_icons[$cat_id]?>"> where $cat_id would be the current category ID.

share|improve this answer
    
Cool thanks Miha, I'll give that go and see how it goes. –  a_knife_a_fork Oct 10 '12 at 9:59

You can use a plugin such as this:

http://wordpress.org/extend/plugins/taxonomy-images/

These plugins work by adding a term meta table, then adding a meta key/value holding the ID of an attachment, the same way featured images work with posts, but for taxonomy terms

share|improve this answer

You could also set a background image with the auto-generated css class category-slug in your stylesheet

share|improve this answer
    
Please elaborate how this would be "auto generated". –  kaiser Jun 25 '13 at 22:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.