How toHow to display icons in posts

1. download the plugin and install it.
2. Upload your images to your upload folder. The size of the icons depends on your needs & theme. There’s no recommanded size to use the get_cat_icon() function.
3. Assign icons to your categories in Manage tab.
4. Then, in Template Code, the plugin will show you where to put the get_cat_icon() and put_cat_icons() functions in your theme files :

templatecode.jpg
5. You can also use the widget to display icons in your sidebar.

Note that the ‘small’ icons are displayed by default. If the small icons are not found, the normal icons will be displayed, and vice versa. If you have both type (normal and small) and you want to display ‘normal’ icons, you must use set the parameter ‘small’ to false.

Example :

I want to display ‘normal’ icons in my posts. I’ll put that code in index.php (for example) :

get_cat_icon('small=false');

22 thoughts on “How to display icons in posts

  1. When you insert the code, how can you tell its in right column? Are there text readers showing the columns?

  2. @noircine

    In TextEdit (I’m under Mac OS) (or another editor), put your cursor in the left of the line, and then move it to the right by pressing your right arrow key, as many times as the number of columns.

    Or you can just position the cursor on the line number the plugin shows you, and paste the code just before the corresponding code, i.e. at the position the blue arrow is showing you.

    Or you can use the automatic patching.

    That’s all.

  3. Your files must be writable. If not, the template code (now I call this “Template Tags”) will tell you where to put the necessary code.

  4. @antonio

    I don’t know, but if I were you, I would have a look in the source code of the html page you want to ‘mimic’, and then first try with an image. If it works, just put the get_cat_icon() in the right place, and there you go.

  5. Hi this is an awesome plugin! Thanks a lot! Just wanna ask. How can I display only the first icon?

  6. Hello, how can I do for appears the icons in the lastest post list?

  7. I’ll release soon a new version (2.1) which is compatible with Rob Marsh’s recent posts & similar posts plugin. You’ll be able to put an icon in front of the latest posts titles.

  8. I was able to do up to get up to step three. However, the instructions given for step four do not match what I’m seeing. It doesnt show me any code or where to put it.

    In fact the entire page is blank except this at the top: “get_cat_icon()”

    What I’m trying to do is have my own graphics replace the category name showing for each post of a category. I am able to use the widget to show the icon on the side that I’ve uploaded (although I havn’t figured out how to resize it so its smaller).

    Any help you can give as to what I’m doing wrong would be greatly appreciated. I’m a little scared to experiment with just putting that code in my php custom file because last time I did, it locked me out of my block and broke everything. This time I want to make sure I do it correctly.

    Thanks.

  9. Hi, plugin is installed and working well. Thanks…

    I cannot see this question answered anywhere, have searched throut…

    For the icons at left of post titles, as on the blog’s home page, how can I remove the link around the icon, which leads to the category? The icon/link to category is right next to the post title, which is linked to the post on single.php… This seems a little confusing…. links to two different places.

    I want the icon to appear as visual display for the category, but not be a link.

  10. I found the answer… within the file category-icons.php (in the main folder for the plugin) is a lists of parameters.
    I needed the $link param, default is true, it creates a link around the image tag. To set it to false, here is what I am using on my WordPress index.php

  11. Much like what antonio asked, we need a way to align the image left or right, or at least call just the image path so we can include it in an .

  12. I can’t seem to get this to work at all. The icons will not show up next to the post titles names.

    Where do I add the code to the line as the template file doesn’t help at all.