Wordpress plugin tips - Category icons
I have decided to try out some Wordpress plugins to see if they work well and if it’s easy to customize/implement them. See it as a Wordpress plungin review. I try to look at them as if I was a newbie trying to install and customize them.
I tried out the WordPress Category Icons 1.5, as you can see I have it implemented to the right (no longer implemented in the layout).
Features:
- User can assign or clear icons to categories through admin panel.
- Directory and URL for icons can be specified thorugh admin panel. Upload options can be used instead.
- A template tag (function) is exposed to include category icon into templates.
- Plugint installs itself, by creating a database table and setting default option values, when activated.
It all seem very fine until I wanted to make a class in my CSS file to control the categoryicons look. And sure you can put a div around the image to controle it there. But I discovered that you can put the name of the class in the pluginfile itself.
Here is how I did it:
- Open up category_icons.php in a texteditor.
- Look for line number 66 or search for this code:
if (!isset($p['class'])) $p['class'] = '';
- Type the name of your class that you will use in your CSS. Example:
if (!isset($p['class'])) $p['class'] = 'catimage';.
- Create the class in your CSS file and style it the way you want. Example:
img.catimage {
float: right;
margin:0 0 0 12px;
border: 1px solid #AAAAAA;
padding-top:0px;
}
- Save and upload all files, and you’re ready to go.
Now you don’t have to add extra code (Im thinking about a div around it or something like that) just to customize the the image. Less is more, right?
Another tip I can give you that isn’t really well explained on the site or in the file is that if you choose to upload all your images; create a folder named “uploads” in the “wp-content” folder and upload all your images there. It doesn’t create the folder itself. It’s the default upload folder so you don’t have to change any settings for the script.
EDIT
The author’s website has been down for a long time but I have made my old copy available here. Notice that this version isn’t updated to the latest version of WordPress, use it at your own risk!
Also, here is a post with installation instructions and such.
EDIT 2
There is a new version available: Category Icons version 1.7
that is supposed to work with the latest version of WordPress.
Ps. I don’t provide any support for this plugin!


Can you please tell me where I need to paste the code: ? I have tried a few place in my single post template but no images show up. The actual php shows up in it’s place. There is nothing wrong with the links to the images because the show up just fine in the admin panel. If you can help me I would much appreciate it.
Posted on December 11th, 2006 at 11:17 pm
[quote comment="753"]Can you please tell me where I need to paste the code: ? I have tried a few place in my single post template but no images show up. The actual php shows up in it’s place. There is nothing wrong with the links to the images because the show up just fine in the admin panel. If you can help me I would much appreciate it.[/quote]
Hi!
You should paste the code in the index.php file (in your theme folder!), an appropriate place would ie be next to the post-title… Let me know if it doesn’t work…
Posted on December 12th, 2006 at 5:12 pm
Hi, thank you for your explanation…that was usefull in my case…I am a wordpress newbie.
I am using wordpress 2.1 but in the admin panel under “manage” the icons are not visible. I followed your suggestion of creating an upload folder (my blog had already some categories in it). Although I did that, I didn’t succeed…where am I wrong? Please help. Thanks
Posted on February 13th, 2007 at 1:46 pm
[quote post="4"]# Roberto Says:
February 13th, 2007 at 1:46 pm e
Hi, thank you for your explanation…that was usefull in my case…I am a wordpress newbie.
I am using wordpress 2.1 but in the admin panel under “manage†the icons are not visible. I followed your suggestion of creating an upload folder (my blog had already some categories in it). Although I did that, I didn’t succeed…where am I wrong? Please help. Thanks[/quote]
Hey there! Im not sure what could be wrong since I haven’t tried it with WP 2.1 yet. But go to the plugin’s homepage and ask the author, you’ll probably get better help there :)
Posted on February 15th, 2007 at 4:17 pm
Problem solved, it was just a question of permissions on the upload folder…my fault ;-)
Posted on February 15th, 2007 at 4:31 pm
[quote post="4"]Roberto Says:
February 15th, 2007 at 4:31 pm e
Problem solved, it was just a question of permissions on the upload folder…my fault ;-)[/quote]
Good lol, it’s always something simple ;)
Posted on February 15th, 2007 at 4:33 pm
With this plugin, how or where does it distinguish between Large & Small Icons? The small Icon, I understand, will go in the post header, but where does the big Icon go, how is that called?
Thanks
Posted on April 7th, 2007 at 2:42 pm
[quote comment="1339"]With this plugin, how or where does it distinguish between Large & Small Icons? The small Icon, I understand, will go in the post header, but where does the big Icon go, how is that called?
Thanks[/quote]
Check here under “Usage”…
Posted on April 7th, 2007 at 5:23 pm
Anyone could please link the plugin cause its not available anymore on the dev page.
Thx
Posted on August 2nd, 2007 at 10:35 am
well i found it :) but i need explanation (and the author doesnt answer).
After installing the plugin, i activated it then created a directory where i put the icons i want to use. I paste the path to this directory in the options of the plugin but still i cant select any icons while managing the categories.
What did i miss ?
Help :)
Posted on August 2nd, 2007 at 11:13 am
[quote comment="4806"]well i found it :) but i need explanation (and the author doesnt answer).
After installing the plugin, i activated it then created a directory where i put the icons i want to use. I paste the path to this directory in the options of the plugin but still i cant select any icons while managing the categories.
What did i miss ?
Help :)[/quote]
Perhaps you can try to chomod the folder where your images are? And to get further help with this I suggest that you go to the Wordpress Support forums: http://wordpress.org/support/
Posted on August 3rd, 2007 at 10:42 am
Hi !
Here is the new version : Category Icons
Cheers.
Posted on January 17th, 2008 at 5:31 am
Submarine: Awesome! I’ll add that to my post :)
Posted on January 17th, 2008 at 5:50 am
Hi !
Here is the new location :
http://categoryicons.wordpress.com/screenshots/
Cheers.
Posted on March 26th, 2008 at 3:41 pm
Hi,
here is the new location (the last !) :
http://www.category-icons.com
Best regards,
Sub
Posted on August 23rd, 2008 at 1:13 pm