Simple Category Icons
A plugin for inserting Icons to your categories and other taxonomies in a simple way. The title says it all.
This plugin was developed since I was not happy with other solutions out there ( or the ones I’ve tried, there a millions of them out there ) and decided that a very simple plugin was needed to easily add some icons to your categories and displaying them.
Screenshot of admin interface
Instructions
You can download the plugin using the WordPress repository . Activate and you are done.
Adding to your theme
There are two (simple) ways to add the functionality to your theme.
The most simple one is to just display the icon when displaying categories inside the loop.
<? php if (function_exists('the_icon')) { the_icon('size=small'); } ?>
This function accepts two parameters: ‘size’ (required, can be: small,medium,large) and ‘class’ where you can load a custom CSS class to control the layout. This funtion returns an Image Tag.
For more control you can use get_the_icon function:
<? php if (function_exists('the_icon')) { $icon = get_the_icon('size=small'); } ?>
Common to the_icon function it needs a size parameter. If you specify ‘returnFull=true’ the function will return a full the category object along with the image URL ( if exists ). Otherwise it only returns the URL of the image which you can use.
SCI had many features to customize the output using arguments and even some filters. See the instructions for all possibilities.
Requests and support
This plugin ( and documentation ) is still at it’s first version. In the near future I’m keen to expand Simple Category Icons adding new features to make our lives easier. Comments what you would like to see are appreciated.
Like it?