My personal weblog :)

Categories Images

Categories Images is a WordPress plugin which allow you to add an image for each category (or term), it is so easy to user. This plugin will create a new text input that will had the image url of the category, in both forms when adding a new category or edit an existing one, you can put a url for the image or upload it bu click on the text input.

Installation:

  1. Open your wordpress admin panel, then plugins menu > Add New and search for ‘Categories Images’.
  2. Click to install.
  3. Once installed, activate and it is functional.

Or you can install in manual:

  1. Download the plugin from WordPress Plugins.
  2. Extract it, then upload the extracted folder ‘categories-images’ to ‘/wp-content/plugins/’.
  3. Go to your wordpress plugins menu, then activate it.

You are done! And the plugin is ready to use.
Usage and documentation:
after installing and activating the plugin, just use the following code:
Default usage:
use the following code in category or taxonomy template,put it in any <img /> tag :
<?php if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url(); ?>
Using inside a loop:
use the following code in anywhere at your wordpress theme, here is an example:
If  looping for categories:
<ul>
 <?php foreach (get_categories() as $cat) : ?>
 <li>
 <img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" />
 <a href="<?php echo get_category_link($cat->term_id); ?>"><?php echo $cat->cat_name; ?></a>
 </li>
 <?php endforeach; ?>
</ul>

If looping for taxonomies:

<ul>
 <?php foreach (get_terms('your_taxonomy') as $cat) : ?>
 <li>
 <img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" />
 <a href="<?php echo get_term_link($cat->slug, 'your_taxonomy'); ?>"><?php echo $cat->name; ?></a>
 </li>
 <?php endforeach; ?>
</ul>

If your post had more than one category and you want to loop for all post categories use the following example:

<ul>
 <?php foreach (get_the_category() as $cat) : ?>
 <li>
 <img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" />
 <a href="<?php echo get_category_link($cat->term_id); ?>"><?php echo $cat->cat_name; ?></a>
 </li>
 <?php endforeach; ?>
</ul>

And if your post had more than one taxonomy and you want to loop for all post taxonomies use the following example:

<ul>
 <?php foreach (get_the_terms(get_the_ID(), 'your_taxonomy') as $cat) : ?>
 <li>
 <img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" />
 <a href="<?php echo get_term_link($cat->term_id, 'your_taxonomy'); ?>"><?php echo $cat->name; ?></a>
 </li>
 <?php endforeach; ?>
</ul>

Using resizing feature:

To resize category image simply add the size as a second parameter, for example:
if in category or taxonomy template:

<img src="<?php echo z_taxonomy_image_url(NULL, 'thumbnail'); ?>" />

or if inside a loop:

<ul>
 <?php foreach (get_the_terms(get_the_ID(), 'your_taxonomy') as $cat) : ?>
 <li>
 <img src="<?php echo z_taxonomy_image_url($cat->term_id, 'medium'); ?>" />
 <a href="<?php echo get_term_link($cat->term_id, 'your_taxonomy'); ?>"><?php echo $cat->name; ?></a>
 </li>
 <?php endforeach; ?>
</ul>

you can choose to resize from these (thumbnail, medium, large, full) also you can use it as array with dimensions for example:

<img src="<?php echo z_taxonomy_image_url(NULL, array(300, 250)); ?>" />

Please check WordPress codex here for more information about resizing.

if there were any bugs or you faced any problems please reply to this post, if I had more time I will update this plugin and add more features.

update 26-07-2012: I had noticed that there is some people talking about my plugin, here is a link to the post :)

http://wpshock.com/wordpress-category-images-taxonomy-images-plugin/

another one here also:

http://www.williamsgraphics.co.uk/featured-images-categories-wordpress/

Update 06-10-2012: Finally I got some time to test the plugin in WordPress MU and now I confirm that the plugin works so fine whether you choose to activate the plugin by blog or using network activation from your network control panel

Update 25-01-2013: A great update had been made to this plugin, and hope you liked it, Thank so much to Joe Tse http://tkjune.com

Update 14-06-2013: I had updated the plugin with some new features like using WordPress new media uploader and new sub menu (Categories Images) in Settings menu allowing you to exclude any taxonomies from the plugin, this for fixing and avoiding any conflicts with another plugins like WooCommerce plugin, hope you all like the last update.

Update 20-12-2013: I had updated the plugin with new features like resizing images please check the docs above for more help about using this new feature, and also adding support for Spanish language. Thanks so much to Maria Ramos and to Rahil Wazir for their help.

337 Comments

  1. How do you use it exactly? An example would be nice.

    If I want to loop through a list of categories and display the image, name, and link for each?

    • Sorry for the late update I was busy the past few days, please re-check the post again I had updated it.

    • Dear friend,

      thanks for the plugin but I have a question. When i edit the category, I upload a photo from media library, everything is ok, but then its not shown in the website..any suggestions?

    • How do I show the image of the category next to (before or after) the category name on the Categories list on the homepage of my website.

      Thank you, Muhammad, for your cooperation,

  2. Hi, I have a doubt: I uploaded the image for a category, however, after that, I make click on “Insert in post” and nothing is added to “Image” field on the category edition screen. How do I have to upload an image within admin area?

    Thanks.

    • I can’t guess what is the error in your case, but any way you can copy the uploaded image link and paste it into the image field, click on image field, copy the uploaded image link from your media library, close the upload box or press escape on the keyboard, then paste the copied link into image field.

      • Hi, I’m having this problem as well. When I click on the image field, it does not allow for pasting anything and simply launches the media uploader, and when I choose an image or a url or upload an image from my computer, then hit the button that says use the image, the box closes but nothing appears in the image field. There is no way I can get an image URL to appear in that field. I’m on the latest version of WordPress. Any ideas?

        • may be something wrong with your javascript, most the users had reported it works great with the last ver of wordpress, but anyway you can copy the image url manually and put it in image field, it will work fine

          • Hi!
            I had the same problem just in case in media uploader I had the “link URL” field empty (before insert into post/category).

            If it’s not empty (the img url is visible in Link URL field), the plugin works perfectly.

            Thanks for tha awesome plugin!!

    • Your atricles are for when it absolutely, positively, needs to be understood overnight.

  3. Hi! great plugin!
    I’m trying to use your function to get the category image in single.php, I mean, I want to get the category image uploaded also inside a single post… but I can’t get it!

    Also in archive.php I’m using

    <img src="" alt="" />

    "other thing"


    It’s works great, but seems like the conditional it’snt working… when I haven’t image uploaded it’s showing a broken link image…

    Could you help me? Thanks a lot!!!

    • ups! I wrote the code tag wrong… sorry…
      I wanted to say that the conditional is not working… always try to show an image…
      “if (function_exists(…”

      • I’ve just found a solution, only valid if you are using only one category for post, like my case.

        <img src="term_id); ?>" />

    • Thanks so much, hope your problem had been solved, if you want to list categories with images anywhere, you can use the loop method in documentation, and this will be useful if the post had more than 1 category.

      • Hello Zahlan. I have installed the plugin and added an image to the Category “Agricultural Engineering” on / in the Business Directory plugin. http://everythingagricultural.com/business-direcotry/

        As you can view the thumb nail image 80×80 is not visible. I tested your plugin again on a newly added Category but the image is still not visible.

        I have seen the comment about the “loop” but I do not know where I should place the code and I am worried about updates breaking the code after I input the images.

        • I have the same problem on my site.
          I don’t see the image category in the site. Do we have to edit the code? Thanks!

  4. Thanks for plugin :)
    Can i aks u something? I have a problem: some of my posts have different categories (ex: cat1, cat2, cat3) but if i put your code into my template:

    appears only one icon, and not the icons of cat1, cat2, cat3
    how can i do?
    Thanks
    Alex

    • Thanks, have you tried the loop method in the documentation above ? I think it will solve your problem. I had updated the post check the 3rd example.

  5. Thanks for the awesome plugin!

    I have a quick question:

    I am currently using the “looping for categories” code you provided (with a few minor changes). But I was wondering how would you go about excluding a category.

    Here’s a link to the test site that I’m working on. Note the little square above the True(ish) thumbnail, that’s the category I want to hide
    http://www.test.campallaccess.com/site1/category/messages/

    Thanks.

    • Thanks, you can easily pass any arguments you want to get_categories() function, for example (as in your case) you want to exclude one or more categories:
      $args = array( ‘exclude’ => ’1,2′ );
      as you noticed I had excluded category id 1 and category id 2, and then pass this array to get_categories() function like this:
      get_categories($args)
      btw, and you can use more arguments as explained in the wordpress codex here: http://codex.wordpress.org/Function_Reference/get_categories

      hope this would help :)

      • For whatever reason I kept getting php errors… But it’s ok. I figured out another way that should actually work out better for my current setup.

        Thanks anyway!

  6. Is there some easier tutorial how to do it? I don’t know much of programing. I got lots of categories at my site.

    Thanks in advance for your help.

    • Ok no problem, just tell me exactly what do you want to display and I will try to help :)

      • As I said before I got lots of categories and I would like to have one icon per each superior category. Please check out my site and let me know if that’s possible to do it.

        Thank you very much.

    • Ok simply after downloading and activating the plugin, just use one of the 4 examples above like this way:

      - use the 1st if you want to get the category icon url in (category/taxonomy) template.
      - use the 2nd or 3rd examples if you want to get a list of all (categories/taxonomies) in any template.
      - use the 4th example in single template in case your post have more than one category and you want to list them.
      hope this would help.

  7. Free knlowdgee like this doesn’t just help, it promote democracy. Thank you.

    • Thanks so much :)

  8. I appreciate your help.

    • You are always welcome :)

  9. Do you have any plans to add a size selector using image size such as the thumbnail, or custom image sizes that are added?

    • The main idea of this plugin was to make it so simple, but I like your idea, I will think of it :)
      Thanks so much

      • Thanks. I was thinking on it last night and I think the easiest would be to expand the function that pulls the image like this…
        z_taxonomy_image_url($cat->term_id, 'thumbnail')
        As it is now, I’m hard coding the image size of the icon and using 3 different sizes for different displays.

        • please tell how can i get the particular size category image

      • This plugin does not support more than one size of the image per category.

    • currently you can change the category/taxonomy image size before inserting it to the image field while adding or editing any category/taxnonomy (I mean before pressing insert into post button). I had made it this way to let you even use outside link of the image, not just hosted images on your website.
      But ok, I will think of changing this to make it more flexible about getting the image url.
      Thanks for sharing your thoughts :)

  10. Hiya, could you show me how I can show just the child categories of a particular category. I basically have a main category lets say “Drinks” and under them have “Wines” “Fizzy” “Beer” etc and I just want to show the categories and images with those child categories.

    Thanks :)

    • check this comment and replace $args = array( ‘exclude’ => ’1,2′ ); with this $args = array( ‘child_of’ => 1 ); as 1 is your parent category id (drinks in your case).

      • Hi Zahlan, thanks for the reply but I’m having trouble. All the categories are still showing this is the code I am using could you take a look…

        9 );

        foreach (get_categories($args) as $cat) : ?>

        <img src="term_id); ?>" />
        <a href="term_id); ?>">cat_name; ?>

        • For some reason the code didn’t format (I did wrap in tags. Anyway I have put it on pastebin if you can have a look for me.

          http://pastebin.com/YFqgdxUi

      • Hi Zahlan, with a bit of tweaking I’ve sorted it now, thanks for the great plugin :)

  11. Hi, Thanks for the great plugin.

    I have installed it and added a few images for my custom taxonomy.

    Displaying the images and name of taxonomy entry is a challenge. Please help me.

    Tha code in my page template is as follows.


    term_id);
    echo get_term_link($cat->slug, 'store');
    echo $cat->name;
    }

    get_footer();

    ?>

    Thank you

    • Thanks, please check my reply at this comment hope this would help in your case.

  12. Thanks for the great Plugin
    how to use it inside normal wordpress loop ?

    • Thanks Bahaa :)
      Simply use the last example in the documentation and it will work fine if you use the default wordpress loop.
      In case you are using another loop (like using get_posts and foreach) pass the post_id to the function get_the_category and it will work fine.

      Hope this would help :)

      • Thanks Zahlan Worked successfully

  13. Hi Zahlan,

    thanks for this plugin! now I have a little problem. I have two taxonomies that use some terms with the same name. now when I call z_taxonomy_image_url() with $term->term_id I get the same image for both terms called “hogan” which are in two different taxonomies. I tried changing the slug of one term but it still uses the last defined image on either of the terms.

    any help greatly appreciated!

    • Thanks so much.
      I think using a different slugs for each one will solve this problem, but let me check again to make sure there are no bugs here, wait for my reply.

  14. Can the image field be displayed within a view, using the Views plugin? I’m not able to select the image field as a custom field, nor does the PHP code work. Any advice would help.

    Thanks for the plugin!

    • Thanks, wordpress categories does not have custom fields, only posts or pages that supports custom fields if that what you asked for, I’m using wordpress options to save each category or taxonomy image in my plugin.

  15. I was wondering if you could give an example of creating a shortcode for the category image?

    Thanks

    • Thanks, I’m not using shortcodes in my plugin yet, put thanks so much, I will update the plugin soon :)

  16. Sorry if I am brain dead here. I have the plug in working but on the single page of the post the category image does not show… help!

    • You can use the last example in the above documentation.

  17. I’ve tried and tried to made this work, but I can’t call the image in my template. Please let me know how I can make it show in this:

    PAGE)): ?>
    ITEMS; ?>

    CATEGORY); ?>

    <div class="dt-onethird">
    name; ?>

     

    $pagination,
    'tax_query' => array(
    array(
    'taxonomy' => 'portfolio',
    'field' => 'id',
    'terms' => $portfolio_id
    )
    ),
    'paged' => $paged
    );
    ?>

    • no problem I will try to help you, I just need the code as you can see it is not completed here in the comment, so if you don’t mind upload it to Dropbox or any other website like that.

  18. Thank you very match! It is a great plugin.
    Tell me please how to make pictures with the category title.
    Example: http://mydiva.ru/serialy_online/

    On this site I used:

    <a href=""><img src="term_id); ?>" />

    • Thanks, please check this comment hope this would help in your case.

  19. Hi Zahlan,

    Thanks for making the best categories images plugin available, I’ve got it working great with my standard posts, however I’m having trouble using it with my Custom Post Type. I want to list all the categories for my type ‘product’ with their respective pictures, and I can’t seem to do so with any of the examples above. I’m a bit of a WordPress noob and not used to get_categories, which doesn’t allow me to use post_type to name my custom post type – could you explain/post the code for how to do this?

    Many thanks

    • Thanks so much, yes exactly you can’t use get_categories while you need categories of a custom post, so you can use the 3rd example in the documentation and don’t forget to change ‘your_taxonomy’ with the taxonomy name that you register with your custom post.

  20. This plugin looks great. One question: How can I load the image in the header.php (outside loop) for the category “page”, I think it is called category archive page. Can you provide a php example ? Thanks!

    • you can use is_category() function in the header to check if you are in category template or not, like this example:
      < ?php
      if (is_category()) :
      if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url();
      endif; ?>
      ?>

  21. Hi Zahlan!

    Thanks for the PlugIn! It works great!

    I just wonder if there’s a way of putting category description to that.

    Best regards,
    /Jennie

    • Thanks so mcuh, getting the category description is not related to the plugin at all :) but I can help you, just tell me where to put the description I mean which template ??

      • Hi Zahlan,

        I would really appreciate your help. It’s for the index.php template and I am making a horizontal list of categories with title, image and description underneath.

        Here’s the code:

        cat_name; ?>

        <a href="term_id); ?>”><img src="term_id); ?>” />

        Unfortunatly it doesn’t work. I wont show the description.

        Thanks!
        Best regards,
        /Jennie

        • Hi again,

          Seems as if most of the code was cut of. Here’s a new try:

          cat_name; ?>

          <a href="term_id); ?>”><img src="term_id); ?>” />

        • try to put it in a text file or use this website

    • ok I had seen your code, simply change “echo category_description();” to “echo $cat->description;”
      may this fix your problem.

      • Wow! Thanks a million! It worked!

        • always welcome :)

  22. Hi was wondering if I can get a list of parent category images that link to sub category images that then link to their page….

    • sorry I couldn’t understand, please tell what exactly you want.

  23. Hey Mr Zahlan,

    first things first: I love the plug-in. Awesome job.

    But I have a problem. By now, I have a category for “featured” posts to put certain posts in a special position in the blog. i don’t want these categories to appear as category images so I just gave them a 1x1px transparent image which, of course, kills my layout (in a way).

    Is there a way to exclude certain categories from showing up as images?
    Not giving them an image at all is not an option since some browsers still show the (X) “image not found”-thingy.

    Thanks for your help!
    Joe

    • Simply you can assign the result to a variable and check if this variable is empty or not, check this code:
      < ?php
      $cat_image = z_taxonomy_image_url($cat->term_id);
      if (!empty($cat_image)) :
      ?>
      // your category image
      < ?php endif; ?>

      • Worked like a charm! Thanks a lot.
        For everyone else, here’s the code i used:

        http://pastebin.com/unbyup0x

        • Not at all :) you are always welcome

        • Awesome Joe, done according to your mentioned link,
          Thanks Joe & Zahlan.

  24. hello,

    This plugin is great! but i only have a question.

    How i can show only the taxonomy images of the post?
    namely I have for example: taxonomy -> Social Networks. and i would like show in the entry or profile the social network(taxonomy images) of this person.
    Expample:
    Name: John Brad
    Social Network: facebook(image) | Twitter(image)
    Descrption: xxxxxxxxxxxxxxxxxxxx

    Ok, so i have more social networks: digg, twenty, etc… in the taxonomies, but I just want to show the of that profile

    Sorry for my english!

    • I need a solution, i don’t know how it’s made! I try many things but don’t get it

    • which template you are in ?

      • I created a new custom theme, and i have it in my localhost, not is online…Only i need know if i can use other system without foreach for that only show the taxonomies for the post, no all of taxonomies. I use this:

        <a href="slug, ‘socialnetworks’); ?>”>
        <img src="term_id); ?>” />

        But this print me all the taxonomies son and i only want show the profile taxonomies.

        Understand? sorry I dont write and speak good english

    • check this comment and replace $args = array( ‘exclude’ => ’1,2′ ); with this $args = array( ‘parent’ => 0 );

      • Sorry, but i don’t understand… :(

      • ok I’m sorry I think I got you wrong, ok let us simply use the 2nd example in for loop method in the documentation, all you have to do is change get_terms(‘your_taxonomy’) to get_terms(‘your_taxonomy’, array(‘parent’ => 0))
        This code means that you want to loop for parent taxonomies only (looping for the top level taxonomies), I’m sure this will fix your problem.

        • Hi… I’m using this in my project on taxonomy-productcategory.php so that I can show the subcategories of the parent terms. I have got it to work by hardcoding foreach (get_terms('productcategory', array('parent' => 6)) as $cat) : and it will show me all subcategories, but I need to code it so that it picks up what category page it’s on dynamically. Any help would be greatly appreciated!! Thanks

  25. I bodged the code to save image ID rather than URL. I uploaded the modified files here in case they might be of use – Hope you don’t mind.

    http://www.teamtownend.com/2012/10/categories-images-plugin-modified-to-save-image-id/

    Thanks for a great plugin.

    • Thanks for enhancing my plugin :) but let me explain something, the reason I use the full image url to not force the user to host the image at his blog, he can use any url from anywhere, also I’m using it to let him easily can use any re-sizing image tools like timthumb.
      I had also check the code, it will only work in case you have a taxonomy called ‘package_cat’ because you had disabled my foreach :) so by default the plugin after your modifications won’t work, I think you should test it on a new wordpress installation. Thanks again :)

  26. What code shall I use if I have multiple categories? Actually this is not a post category. It’s a listing category. I tried the code above but it did not work.

    • do you mean multiple categories for one post ?

      • I have the same problem, I want to show in my page a list of categories with images. If you can help me please. I think your plugin is awesome :)

      • Yes. Code above is not working for me.

      • I have more than one taxonomy/

    • Great, then use the last example above, put it anywhere at your single.php tempalte.
      And if you where using taxonomies (not categories) replace the function get_the_category(); with the function get_the_terms( $id, $taxonomy ); where $id is the post_id and $taxonomy is your taxonomy. I will update the documentation and add another example for that, Thanks.

  27. Hello,

    How can I use this outside of The Loop and with custom category?

    • In which template you want to do that ?

  28. Hi, how to add external link for this image? Example: in my template i put this: <a href="term_id); ?>"><img src="" alt="" />
    But on <a href="term_id); ?>"> link to category, I want this category image link to external link. Example: category image “Best Buy” link’s to “www.bestbuy.com”. How?

    • simply in the ‘href’ attribute just don’t use the php code to get the category link and put your link

      • I’m using this code:

        <img src="”/>

        to pull in the images for the different category and I would like all the images to have different external links. How would I do that?

  29. Hey Zahlan, I was wandering if was possible to use a resize command when calling the category image, this way I only need 1 higher quality image which can then be resized to make the smaller thumbnail versions as well. If this isn’t possible how can I have 2 image fields per category.
    Thanks in advance.

    • Hey, Thanks for using my plugin.
      The current ver of the plugin does not support image resizing so I recommend to you to use TimThumb plugin, you can upload a high quality image and use the Timthumb plugin easily to resize it while displaying it :)

      • Hey, thanks for the reply.
        How do I use the TimThumb plugin with wordpress? Then how can I get it to work with your plugin?
        Thanks again.

    • Ok, there is no special use for TimThumb with WordPress, and you can use it with or without my plugin, for example all you have to do is to put this in the src attribute of the html tag img : http://www.yoursite.com/path/to/timthumb.php?src=image_url.jpg&h=180&w=120

      • Thanks for that. I managed to get it working. It works a treat!

  30. Hi – Nicely done plugin. I was using it fine and then I changed the folder structure so that all images are stored in the same folder (not organized by date) and this seems to have broken it. Unfortunately I am have to use that folder structure. Is there a way around this? Cheers,

    • Unfortunately if you change the upload folder structure won’t display images because the image full path is stored as the image filed value, so you have to maintain the upload folder structure or you have to change all categories images to the new structure

  31. dear zahlan!
    i think I like your plugin, but don´t know now how to use it properly. I want to replace the two categories in the left sidebar with one image each. but i don´t know where to put that code exactly to achieve that.

    it would be great if you would just have a quick look at my site!

    thank you very much!
    Steffi

    • Thanks so much, try using the 1st example (in using inside a loop) in the documentation.

  32. İşime yarayacağını düşünüyorum. Teşekkürler…

    • Eğer hoş geldiniz ;)

  33. Great plugin!
    But I have one question.
    How can I order the categories by id instead of alphabetic?

    Thank you :)

    • Thanks, you can do that by passing some $args to the function get_categories($args) and you can find more about how to do that in the WordPress codex here

  34. Dear Zahlan,
    Yes, I have tried the one you told me, but it gave me an error.
    I was putting it in the functions.php at the end, but am not sure where to put exactly. I´m not familiar with php coding, have read a bit about it but its very hard to learn within some days…. ;)

    I appreciate for your help very much!
    Steffi

    • It’s Ok, no problem, 1st you shouldn’t put my example at your functions.php you should put it inside your theme, for example if you want to list categories in sidebar or something like that, use the 1st loop example and put it into sidebar.php or if you want to list categories in home put the code into index.php

      try this and tell me if you got what you need

  35. Dear Zahlan!
    I would like to show you my sidebar.php
    I´m using a 3 column layout but want to show the images in the woocommerce sidebar, maybe thats useful information for you. here´s my code:

    ‘monthly’ ) ); ?>


    <img src="term_id); ?>” />
    <a href="term_id); ?>”>cat_name; ?>

    now, where I was putting it, it´s not doing anything.
    I feel already bad to post again, but would love to use your plugin!

    So thankful for your help!

    Greetings
    Steffi

    • I can’t read your code here, please share it via pastebin

  36. Hi Zahlan,

    First of all. Thanks for the simple but great plugin. I’ve got just one advice. If you’d change line 29 in categories-images.php form “wp_enqueue_script(‘thickbox’);” to “wp_enqueue_script(‘thickbox’); wp_enqueue_script(‘media-upload’);” the “Choose Image” popup will resize itself to fit the screen.

    Greets.
    Milan

    • Thanks so much for your advice, but the current version of the plugin already do what you said :)
      I didn’t notice any problems!

  37. Dear Zahlan!
    Any news about my code? Still want to use your plugin! I hope you can read the code!

    thank you very much for your help!
    greetings
    Steffi

    • Really sorry for my late reply.
      I had checked your code, you are using the sidebar.php and my example should work normally, please tell me exactly what happened when you put my code ?

  38. Hi Zahlan,

    Is there a way to set a default image for any category that does not have an image assigned? I am creating a related posts widget and need to have an “image not available” type image display.

    Thanks for your work on this plugin,
    Amy

    • Thanks so much.
      You can find your answer in this comment :)

  39. dear Zahlan!
    actually nothing is happening when I put your code. I can see the image-uploader in the categories and have already put an image. but in the frontend on the page itself the image is not shown.
    what am I doing wrong?

    greetings
    Steffi

    • try to move the example code into the category template, and make sure that the categories you are want to display chosen in some posts

  40. hi i have installed the Categories Images plugin and used the code

    term_id); ?>
    <a href="term_id); ?>”>cat_name; ?>

    its displaying the category name and link but the image is not display its leaving blank plz help me

    • make sure that you have added an image to this category from the admin panel 1st and the value of the image field has the url of this image.

  41. Oops, here’s the code…
    http://pastebin.com/nub0HBiv

    • Thanks so much, simply replace wp_list_categories(‘depth=1′) with get_categories(array(‘parent’ => 0))
      btw the wordpress function wp_list_categories() already output(echo) data so you can’t use it inside a loop.

  42. Good job. Thank you.

    • Thanks :)

  43. Useful plugin, I extended it a little and sent to your mail.

    • Thanks, and nice work, I already replied to your email.

  44. Hi, Great Pluggin!, Congratulations!, and thanks for built it!

    I modify your code a lillte, for show only the parent Category Images :)

    http://pastebin.com/2yP5ZUKJ

    Greetins!

    • Thanks so much :)

  45. thanks. Great Pluggin!, Congratulations!,

  46. On WordPress 3.5 the image is not shown….uhmmm

    • this issue had been solved :)

  47. On WordPress 3.5 the image is not shown..uhmm

    • Thanks for reporting this bug, I already fixed it, you will get the update from wordpress soon, Thanks.

  48. hello zahlan,
    first thumbs up for the plugin.
    recently i updated your plugin to 2.2 and unfortunately, the plugin function is unable to retrieve the image url for display. could you check this issue?
    anyways,
    thanks

    • Thanks so much, yes some users already reported this bug and it had been fixed this morning and you should be noticed about a new update of the plugin.

      The current working ver of the plugin in the date of this this comment is 2.2.3

  49. Is there a way to add this to the twentytwelve “Posted in…” function: function twentytwelve_entry_meta()

    Thanks for your help

    • sorry can’t understand, can you tell exactly what you want to do ?

  50. Awesome plugin! Is there a way to get rid of the bullets from the list?

    Second question, what would be the best way to reconfigure the list into a grid?

    • I think you are talking about html and css :) so you can do what ever you want

  51. wordpress 3.5.1, theme, Twenty Twelve
    I have usd this code, in category.php in H1

    <img src="” alt=”” />

    Plugin work fantastic with categories.
    I have used the same code in theme/tag.php but the image not display.

    Can you help to me?
    Regards

    • sorry I can’t get you, you mean you want to put images for tags ?

      • 给分类添加图片 用调用代码在分类页面可以实现调用,可是给标签添加完图片之后用调用代码在tag.php页面调用之后 无法显示啊,求助!!

      • Does this work for tags as well?

  52. Hello Zahlan,

    Love the plugin but I can’t get the images to display. I created an image for each category, uploaded and placed the url in each category. The thumbnail in the categories page is populated but the post widgets (home page)do not display the category image. I wanted the category image to be displayed whenever a single post did not have a featured image. What am I missing?

    http://shgww.com

    Jeffrey

    • have you tried one the examples in the post ?

  53. There is a support item on the wordpress site http://wordpress.org/support/topic/specify-which-taxonomies-to-use-with?replies=4
    which looks like an enhancement request.
    However, because the taxonomies cannot currently be specified this plugin conflicts with any other plugin or code that uses taxonomies and images. The WooCommerce eshop plugin is a prime example of this.

    • I will have a look to this issue, Thanks for reporting it.

  54. Hello,

    First of all I gotta say what an amazing and wonderful plugin you developed here. Thank you so much! However the issue I’ve run into now is that it seems taxonomy images aren’t working for IE6 users. I know that most people are no longer using it, however my client still has a significant number of those users and he can’t drop them.

    Is there any possibility of making some small modifications to the code so that IE6 users can also view the images? IE7 works fine it seems.

    Thank You and a great plugin once again!

    • Thanks, I didn’t use IE6 since ages ago, but I will check it for you.

      • Hi Zahlan,

        I tried again on IE7 and actually it doesn’t seem to work either. IE8 works but not 6 or 7. When I view it on IE7 for a second or two the images are displayed, however after that nothing, they disappear. Is there anyway to get this to work?

        Thanks

        • I think your problem with css and html, so in this case I can’t help you :)

          • I disabled all CSS and unnecessary HTML elements and the problem still persists. The images no matter what won’t show up. This is really problematic in that the client really wants IE7 users to be able to view the site. Is there no other way for you to try and test this?

            I’m willing to make a donation or pay per hour if you could resolve this issue, just send me your paypal details.

            Thanks so much!

          • Hey actually you were right, the width: 100% isn’t supported by IE7 so that was the issue. Thanks man

    • you are always welcome :)

  55. Hello everybody. Thank you Zahlan for such a useful plugin! I use this categories-images plugin on all of my WordPress projects.

    Just wanted to share this note with people using this plugin and the WooCommerce plugin together. Because WooCommerce uses the same button id names “update_image_button” and “remove_image_button”, adding product category images to WooCommerce categories breaks, and neither plugin works for these product categories (taxonomy).

    The simple fix for me was to rename these 2 buttons in your plugin to something else, like “update_img_button” and “remove_img_button” so that the jQuery code works and does not conflict with WooCommerce Product Categories. Of course I could update the WooCommerce plugin, but since this plugin is so much lighter and easier to manage, I chose to update this plugin instead.

    Perhaps in the future, this plugin could rename these 2 button ids/names so that it works with WooCommerce automatically. Of course this is up to the plugin author, Zahlan.

    Thanks again! — Marty McGee

    • Since my plugin in newer than WooCommerce plugin, so I had updated mine to avoid conflicting. Thanks Marty McGee.

      • This is a great plugin. It is really simple to use and lightweight.

        I was also having some issues with Woocommerce since it has it’s own built in taxonomy image control for product_cats. I found a way to turn off the category image for product cats only by removing the actions and filters for category images for that taxonomy only. This is what I used in my theme functions:

        // remove the other category image plugin by Zahlan when in the admin for woocommerce
        add_action(‘admin_init’, ‘undo_z_init’, 999);
        function undo_z_init() {
        $z_taxonomies = array(‘product_cat’,’product_class’); // add any taxonomies you want to omit for category_images plugin
        if (is_array($z_taxonomies)) {
        foreach ($z_taxonomies as $z_taxonomy ) {
        remove_action($z_taxonomy.’_add_form_fields’, ‘z_add_texonomy_field’);
        remove_action($z_taxonomy.’_edit_form_fields’, ‘z_edit_texonomy_field’);
        remove_filter( ‘manage_edit-’ . $z_taxonomy . ‘_columns’, ‘z_taxonomy_columns’ );
        remove_filter( ‘manage_’ . $z_taxonomy . ‘_custom_column’, ‘z_taxonomy_column’, 10, 3 );
        }
        }
        }

  56. Hi! i want make a query of a image of a speficic category…

    for make a list of categories with his thumnnail…

    what can i do?

    Regards, Patricio.

    • I don’t know why your comment was in the spam, I just noticed it. please upload your code to pastebin so I can help you.

  57. Hi, great plugin, could you please post an example using a custom taxonomy, I cannot seem to get it to work with the WordPress custom taxonomy call.

    Many thanks,

    • have you tried the example above ?

  58. amazing plugin. How can I show only parent categories and on hover show subcategories?
    Help would be appreciated

    • Thanks, please check the comments above, you will find what you want.

      • Im not sure if you meant by this comment
        9 );

        foreach (get_categories($args) as $cat) : ?>

        <img src="term_id); ?>” />
        <a href="term_id); ?>”>cat_name; ?>

        But it dosent work for me.
        Im trying to do it like this wordpress function

        http://codex.wordpress.org/Template_Tags/wp_list_categories

        • I want to show all categories available on site

  59. Great plugin, thanks! works perfectly

    • Thanks :)

  60. Man, you have helped me a lot. Thanks!

    • Thanks ;)

  61. Hello, Zahlan. Firstly, I must thank you for this plugin of yours. It was truly what I was looking for! I successfully posted a list with the images, titles and descriptions on a page so my visitors have an idea of what I blog about.

    Unfortunately, there is something I seem unable to do and I could use your help – please note this is not directly related to your plugin, meaning its functioning, so you are free to neglect me any help on the following: I would like to have an image of the proper category appearing next to the post title. Saturday, when I started my blog, everything seemed fine> I used your plugin on both the index and single files and styled it a bit and the category image appeared successfully. However, today when I was doing the list for all categories, I made a new testing post just to see how it worked: the list is working fine but as you should expect, now the icons for the two categories I have are appearing on both my posts.

    Is there any chance to make ONLY the correct category image appear within a post? I know that it is possible to show the category images on posts but I am perfectly ignorant as to do it with your plugin, or even if that-s ‘workable’.

    The address in question is http://blog.wizard-wheezes.org, not the main website listed on this comment form.

    Thank you again for sharing this plugin with us and thank you also for your much awaited reply (or of any other user currently reading this message).

  62. is it possible to reverse the order.. so with my example, number 40 will be at the top

    • Yes, you can do that by using the ‘order’ parameter, for example:
      < ?php get_categories(array('order' => ‘desc’)); ?>

      Please check the WordPress Codex for more parameter and examples.

      Thanks.

  63. Nice Plugin

    • Thanks :)

  64. Hi Zahlan,
    Grt work buddy, but I need more of ur help :P, the thing is, i want to show the sub categories of the parent category i clicked, any help regarding this

    Thanks in advance

    • Thanks so much.

      Please check this comment and for sure you will have to use the parameter ‘child_of’ for the current category id.

  65. I can not show the image on the home, see the expression

    $return_html .=”;
    (here like to have a condition if the posting has not show the thumbnail category)
    $return_html .= (!empty($val['image'])) ? ”.$val['image'].” : ”;
    $return_html .= (!empty($val['title'])) ? ‘‘.$val['title'].’‘ : ”;
    $return_html .=”;

    • I can’t guess what is the problem here, so if you don’t min please upload the full code to pastebin

  66. İlgi çekecek bir içerik.
    Kullanılabilir, teşekkürler.

    • teşekkürler :)

  67. http://pastebin.com/AYfrb14N SEE CODE

    THANKS FOR ATTENCION

    • You are using the plugin function in a custom loop, so all you have to do is to pass the category_id to the function, for example: z_taxonomy_image_url($cat_id) as $cat_id is the category_id of the post in your loop.

  68. Hello I just installed the plugin and was happy it worked I was able to upload my pic to category (I want to have a feature image at top – I only have one category for posts for my site with no subcategories) the thumb shows in the edit mode but there is no picture in the actual category. I then added your fist code at the top here and I now get just the text path to the image and its not a link just the text. NOTE: I have the gonzo theme and for categories it has a line divider with a label title saying “your browsing x category” I did not want this so I deleted the code in the category template successfully here is the top portion of the file as well I will mark where I deleted code and what that code was. Also please let me know exactly what to input and where as I do not know this stuff well thanks!

    ADDED YOUR CODE HERE AS WELL AS ON DIFFERENT LINES SAME OUTCOME

    REMOVED THIS “name);?>” TO HERE

    <?php // Determine whether to use a preset blog style or echo content (with shortcodes)

    $category_blog_style = get_tax_meta($category_ID,'omc_blog_style');

    • All you have to do is to put this path into a tag img, if you notice in the second example above I put the return of z_taxonomy_image_url() into an img tag

  69. Thank you very Much !

    You saved My Life… Awesome Plugin !

    • Thanks so much :)

  70. I love this plugin, its so easy to use. However, I need a little help.

    Im creating two custom post types that do virtually the same thing, list all taxonomies (categories) in a custom post type, by thumbnail – with a link to the single custom post.

    Has anyone figured this out for two custom post types with two sets of taxonomies?

    Got it working for the first, but not for the second, it just reverts to index.php

    • nevermind! works perfectly on two separate custom post type taxonomies. The error is in my post type, when I set my permalinks to default, looks beautiful.

      • Great that it works for you

  71. Hi Zahlan,

    great useful plugin!

    I think I’ve found a bug. When you use Editor role you can’t upload images, the path is not copied in the Upload text box after clicking Insert Into Post on the Media popup. Using a custom taxonomy and post type.

    With an Admin role it works as expected. Made my client Admin for now, but not ideal.

    Gr,

    Martijn

    • Thanks so mcuh for reporting this bug. I will work on it asap.

  72. Hi Zahlan,

    thank you for your plugin! I have some problems integrating it into my code (I’m not a php crack) – so maybe you can have a look:

    I’m trying to loop through all child-taxonomies (works fine) and then displaying the taxonomy image (witch isn’t working yet)…

    Heres my code:

    http://pastebin.com/fZruEaDc

    The last call works fine – I insert it just for testing.

    Maybe you can have a look, why this code isn’t working.

    Greets Jens.

    • Sry, two seconds after posting I’ve found the error on my own!

      Thank you so much for this plugin!

      • Thanks, and you are welcome :)

  73. Hello, I do not have a category or taxonomy template

  74. Good plugin, thanks!
    I use for my many sites!

  75. Hi, I have used the plugin and it worked great and is simple to use.
    The only thing i have been searching to do but didnt found anything.

    I want to get the category image by defining the custom height or width of the image, like the way we use get_the_post_thumbnail.

    So is there a way to get the image by defining the custom width ?

    Please update me asap.

    Thanks

    • Thanks so much, unfortunately this plugin does not support that. However, you can use a resizing plugin like Timthumb to get what you want.

  76. Hey there Zahlan,

    is there any way to output all images from all categories in a list?
    If so, is there a way to do this outside the loop, say for example on the front page?

    Thanks in advance!

    • Yes, you can use the 1st loop example in the documentation above.

  77. Hello ! I’ve installed the pluggin in Classipress and used the first code given in this page.
    The issue is that I have the url of the image displayed and not the image itself.
    I’m not at all used to do things with php. Can uou help please ?
    Thanks !

    • :) ok
      Simply create the image tag and put the 1st example in the src attribute like this:
      < img scr="” />

      Hope I helped

      • So great ! It works fine, tnhak you, merci !
        So quick answer, better than any hotline.

        Cheers

  78. Hello, it’s me again.
    The pluggin works so good that I was thinking to use it in my site first page, where the categories are listed (to have like categories thumbnails).
    The code done before isn’t working. What I have actually is :

    <div id="directory" class="directory “>

    Where is the trick ?
    Thanks for your help.

    Greg

  79. I have to tags: club and player name…

    i want to show only the image for the club tag?
    how can i do this?

    he show nothing when i try this–

    <img src="” class=”head-emblem” />

    • Simply don’t use an image with the second tag :)

  80. Congratulations plugin and the documentation, I got to work with him quiet.

    • Thanks :)

  81. Thankyou Zahlan Werry Good Plugins :)

  82. Hi,

    Thanks for your plugin.

    I am new in word press.i have installed the plug in and i have copy the code and paste to page editor.but i can’t get category image and category Name.

    My code is:

    <a href="term_id); ?>”>cat_name; ?>
    <a href="term_id); ?>”>
    <img alt="term_id); ?>” src=”term_id); ?>” width=”225″ height=”300″ />

    What i am wrong please advice.

    Thanks,
    Venkat.

  83. Hi, I’m trying to incorporate your plugin with this base of code :
    $link .= ‘

    Sorry but i’m very bad in php, how can i replace/integrate your image category ?

    Thank you very much for your help !
    Regards,
    Thibault

  84. Very nice plugin, thank you!

  85. WOW just what I was looking for. Came here by searching for snore guard cvs

  86. Hello,

    I am building a woocommerce site. I would like to use a category image like a banner on top of all the products.

    I am uploading images to the product categories but the images dont show up on the site. What should I do??

    I have attached the temporary URL of the site. I would like a different image under each category on the main product menu.

  87. Hello,

    I Translate Your Plugin To Persian Language and ADD .po File in languages Folder but it does not show

    What should be done?

    thanks.

  88. Hello,
    To begin with, sorry for the mistakes, I’m French !

    In order to not assign a picture to each tag, I modified the code with an “if / else” php option. But it doesn’t work in the else’s case.
    The code is below. For you, what’s the problem ?
    Thank you.

    <?php
    if (function_exists('z_taxonomy_image_url')) {
    echo "term_id).”>”;
    } else {
    echo ”;
    }
    ?>

  89. What if I have categories and if click on cat then display sub-cat. This can be done with wp_list_categories, but then images cannot
    be displayed.
    P.S. Nice job

  90. Thanks for you effort … Great Job (Y) :)

    • Thanks :)

  91. Hi,

    I Want to embed image into timeline cover can you put some light on it

  92. Dear all,

    I am using categories to filter blogs.
    I have ulploaded the plugin and associated each category with a picture.
    The purpose was to have this picture associated in the headbanner for each articles associated with this category.
    What else do I need to do in order for this to work?
    Many thanks!
    Luc

  93. Hi,

    I installed this plugin to change the header-image with the associated category. This really works fine if the category is selected and all all related posts are listed in the content. But when I select a single post from the list, the category image disapears. Even if a post image is uploaded to the selected post it won’t be shown anymore (this works if the plugin is deactivated).
    Any possibility to fix it?

    regards Michael

  94. Uninstall / Category Display Issue Resolved.

    I neglected to remove the php code from the Category Archive template before uninstalling. Sorry for the confusion. Thanks for your time.

    http://cetlindesigngroup.com/sandbox/rankin/category/controls/

  95. I am having an issue with categories that do not have an image specified displaying the first product title of the sub-category as an alt attribute.

    I am using Woocommerce. I am not sure what I am doing wrong or what the workaround might be. I am using the code for a single category, and when an image is specified it displays correctly.

    Any help would be appreciated!

  96. Nice plugin, but when I view a single post that is in a sub-category it’s not showing the image I have set for that sub-category. Should this work or am I missing something?

  97. it’s only for premium? what about free??

    • the plugin is free, there is no premium version of it !!

  98. Hi Zahlan,

    I’m newbie and I’ve install your plugin please guide to me, how to display only one category image in my homepage, I’ve paste your code:

    <img src="” />

  99. This is a really great plugin. Thanks so much for taking the time to create and maintain it. I do have one question, which I hope you have an answer for: How would I display the taxonomy image of a tag outside of the loop?

    For example, in my tag archive template, the top section needs to display the current tag’s image and description, just like it would in the category template. The loop doesn’t begin until after the tag image and description. Here’s what I have in my category archive template:


    <img src="" />

    How would I make this work for tags? I’ve tried all of the examples above, but it doesn’t seem to work without using it within the loop.

    Thanks for any help that you can offer.

  100. Plug in works great. Thanks!

    How can i modify the code to get only the current category image to display
    ?

    • no need for a response. i used

      <img src="term_id); ?>” width=”150″ />

      • $cat = get_the_category()
        and
        echo z_taxonomy_image_url($cat->term_id);

  101. Is there a way to modify the code to use a different url? I have my icons under a directory like this:

    http://siteurl/images/content/sections/news/cats/

  102. Hi,

    There’s any way to show the name of the category?

    Thanks

  103. Hi Zahlan,

    This plugin is exactly what I am looking for.

    I am trying to get the plugin to work with the code below in the single page template.
    I am wanting to use is for an additional features taxonomy. (feature_item)

    But I am not sure what I am doing wrong. Any assistance would be great.

    <img src="" alt="" />

     

  104. Awesome plugin and I love it, i am new in wordpress coding. I use this code

    <img src="term_id); ?>” />
    <a href="term_id); ?>”>cat_name; ?>

    After using this code, category show all the list,when i click in category it does work. I want to make like this: when i click in category,it need to show all the post from the category list. Is this possible?

  105. Hi there, great job on the plugin by the way, its awesome. I have a problem. I’m using wp_list_categories to display my posts and need to somehow include the category images with this. Is there any way to integrate your function in with wp_list_categories?
    I have tried using other ways to display my posts to make it easier to use your plugin but I really do have to do it this way. I can get your plugin to work but just not with wp_list_categories. Any help would be greatly appreciated. Thanks again, Jamie.

    • Hi Jamie,

      Did you figure this out? I’m having the same issue – trying to get the category images to appear while using wp_list_categories. Thanks :)

  106. Hi this is nice plugin… thanks.
    but i have a issue with this.
    in my theme showing main catgory image for the subcategory also. why??

  107. Hello, this weekend is pleasant for me, as this moment i am reading this great informative post here at my house.

  108. A useful plugin. Thank you.

    Like others, I had the need for using different image sizes with the plugin, so I have made some modifications to your original code to store the attachment id (as is done with post thumbnails) instead.

    This then allows you to use inbuilt WordPress functions to get the image at the required size.

    Let me if you’d like me to send you my changes.

    • Rob, can you tell me what updates you made that allow you to specify the size?

      Thanks!

  109. Hi there,
    I have a custom built Library for my podcast and your plugin looked like the perfect addition.
    However, I can’t get the images to show?
    http://crafting-a-life.com/craftlit/?page_id=243

    I couldn’t use the whole code you put above as most of it was already used in the custom code, but I did find the “right” place to put the img src tag… and it’s showing placeholder images but not the real images.

    The images ARE loaded, however, when I look at the Categories listing in the dashboard.

    Thank you so much for the plugin and your help!
    Heather at CraftLit podcast

  110. Hey man,
    How can I get in touch with you for some help with this? <3

    Thanks

    • Feel free to email me at anytime, you find my email in the plugin

  111. This plugin is great. Thanks for developing it!

    One small suggestion I have is to change the images that show up in the category listing to the WordPress-generated thumbnails, rather than the full size image.

    I’ve made a gist of this change at https://gist.github.com/lucasbalzer/8209895

    Thanks again! This plugin is just what I was looking for.

    • Thank so much for the suggestion, I will update the plugin soon.

  112. While reviewing the plugin for use on a site, I found some issues in the code which could lead to some big problems. I documented them for you on the WP.org forum. http://wordpress.org/support/topic/using-guids-for-image-url?replies=1

    • I had replied on the support forum, please check my reply there.

  113. i need show only parent category how to do that right now its shows me all the category details

  114. Hi, I want to display Name of Parent Taxonomy & Below it thumbnails of Sub-taxonomies. I am not getting how to do it. Can you please help me?

  115. I am using wordpress 3.8. The code for “If looping for categories:” works fine but the other codes are not working. Is there any compatibility issue with 3.8 (may be by usage of get_terms, get_the_category, get_the_terms in later codes)?

  116. This comment will help others just like the trick helped me.

    I was struggling with wp_list_categories(), i wanted to show child category image with a list of child category names, so this plugin helped me with to set category image for all category and sub category but i was unable to show image in the front end. I solved this by editing the file category-template.php in wp-includes which is a core file and engine to wp_list_categories.

    I changed

    function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
    extract($args);

    $cat_name = esc_attr( $category->name );
    $cat_name = apply_filters( ‘list_cats’, $cat_name, $category );
    $link =
    ‘term_id) .’” /> –<<<—- added the plugin line ——–

    description) )
    $link .= ‘title=”‘ . esc_attr( sprintf(__( ‘View all posts filed under %s’ ), $cat_name) ) . ‘”‘;
    else
    $link .= ‘title=”‘ . esc_attr( strip_tags( apply_filters( ‘category_description’, $category->description, $category ) ) ) . ‘”‘;
    $link .= ‘>’;
    $link .= $cat_name . ‘
    ‘;

    .
    .
    .
    .

    So i got:

    2 wheel

    honda

    yamaha

    According to the plugin documentation and it worked for me… Thanks a lot :D

    • all the codes didnt show up in the comment area

  117. I can’t understand how to use where I put the piece of code that you gave.
    Can you please elaborate how to use with image?
    How can I get the image source through category??

  118. Hello.
    I like to display only one Category icon/image in the post as a link and not all the available categories.

    Can you please post a sample code for this. Thank you.

    • Forgot to report back, that I managed to figure this out on my own and also added “Title” for the image:

      <a href="term_id); ?>"> <img style="border: none 0px !important;" Title="cat_name; ?>" src="term_id); ?>" />

      Zahlan, thank you for the plugin that actually works :)

      Cheers!

  119. Hello,

    I would like to display a default image if a category image hasn’t been uploaded. I tried the following but it didn’t work. I would be grateful for your help. Thanks.

    <?php
    if (function_exists('z_taxonomy_image_url')) {
    echo '’;
    } else {
    echo ”;
    }
    ?>

  120. Hey there! I know this is kinda off topic but I was wondering if you knew where I could get
    a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having difficulty finding one?
    Thanks a lot!

  121. Good it work for me in widget

  122. Hi ,
    I have a problem with image height i am using
    <img src="” />
    height always show up less than the value i entered

  123. This code/plugin rocks! Super helpful. I’m wondering if it’s possible to set the Featured image as a background image for Category Names?

  124. I am using following code to display the images but the images do not contain ALT tag/text, although I have updated the image alt text in Media->Library, Need help how to add.

    ‘name’,
    ‘parent’ => ’0′,
    ‘order’ => ‘ASC’,
    ‘exclude’ => ’54′,
    )
    ?>

    <a href="term_id); ?>”><img src="term_id); ?>” />
    <a href="term_id); ?>”>cat_name; ?>

    • The detail rest of the code

      <a href="term_id); ?>”><img alt="term_id" src="term_id); ?>” />
      <a href="term_id); ?>”>cat_name; ?>

    • 'name',
      'parent' => '0',
      'order' => 'ASC',
      'exclude' => '54',
      )
      ?>

      <a href="term_id); ?>"><img alt="term_id" src="term_id); ?>" />
      <a href="term_id); ?>">cat_name; ?>

  125. btw, your code tag is not working as expected.

  126. thanks for this.

    but i need to read the comments to get this:
    term_id);
    if (!empty($cat_image)) :
    ?>
    // your category image

    \m/

  127. hi
    i m using this code to display images on my home page
    it displaying the image but with some broken images
    can u plz help me

    <img src="term_id); ?>” />

  128. Hi, and thanks for this great plugin!
    But, I have one question…how to use this plugin with wp_list_categories function? I’m using this function to list categories hierarchically. I want insert image inside the ( li ) tag, before link (not in link).
    My idea is in category page display only subcategories of current categry and it’s subcategories in the same ( li ) tag (hierarchically)…that’s why I need the wp_list_categories function.
    But I dont know how to customize wp_list_categories output, to insert in ( li ) tags a image.
    I hope someone will be able to help me or at least give an indication of which direction to dig.

    • at the moment I using this code to display only subcategories of current category in category page…

      ‘id’,
      ‘child_of’ => $current_term->term_id,
      ‘taxonomy’ => $current_term->taxonomy,
      ‘hide_empty’ => 0,
      ‘hierarchical’ => true,
      ‘depth’ => 2,
      ‘title_li’ => ”
      )); ?>

  129. Hi Thanks for the great plugin.

    I am trying to create a pagination for the categories on homepage. how can i do this?

    <img src="term_id, ‘medium’); ?>” />
    <a href="term_id); ?>”>cat_name; ?>

    Felix

  130. Hi, again!

    I have one question. How to check if the image is set? i want display image tag only when is set a image for this category.

  131. how to show only parent category image on home page and link to category right this code fetch all category event sub

  132. Hey Zahlin, firs tof all awesome plugin, it works perfectly.

    I have a quick question though, is it possible to have the actual image that is uploaded have a URL attached to it? Like, if I click on that image that is being put on the page on the front end, can it have a link included with using the plugin?

    Thanks in advance!
    Mike

  133. hello

    Like your plugin, but i have one questian..
    I use this on:

    <img src="term_id); ?>" />
    <a href="slug, 'car-list'); ?>">name; ?>

    And now it only show the one that have one in the count.
    But how can i do if i whant to show allt the taxonomy.

    • this one.

      <img src="term_id); ?>” />
      <a href="slug, ‘car-list’); ?>”>name; ?>

      • I cant show the code.
        Is the code that are: If looping for taxonomies:

        try again:

        <img src="term_id); ?>" />
        <a href="slug, 'car-list'); ?>">name; ?>

  134. great work really, I was looking for such function since a long time.

    Any help how I can center the banner (image ) in the body area of a page with side bar?
    Now the image is center all over the total width of the page, I just to display in center the body page ignoring the width of the side bar.

    Thanks for any help
    regards

  135. Hi Zahlan!

    Great plugin, thank you!

    One question – I’d like to display “new.gif” image next to categories where a new post been added to in the nav menu. Can you give me any hint, how to achieve this if I use your plugin as a base?

    Thanks in advance!
    Estela

  136. Great plugin, thank you!

  137. Hello, I’m using your plugin and i can’t seem to display an image on my tag.php page, it displays fine on the category.php, any idead?

    Thank You In Advance!

  138. Hello, thank you for this great plugin.

    After some digging i found out that it works even better with the plugin Post Tags and Categories for Pages

    I wanted to have different pictures like small headers in my category title section on each page. So i used Categories for Pages to add your code with a small adjustment <img src="term_id); ?>" /> So that each page has his own picture. I really liked that my idea worked out. Im not much of a programmer though each day im getting better more and more.

    Thank you so much, keep up the good work ^^

  139. Hello Sir,
    How can I get Image Url of Category Image that is stored in wp-option table?
    Pls, Give me Guidance about this.
    Thank You.

  140. Hi,

    In index.php, how to echo <img src="” /> by catgory id

    as:
    <a href="” title=””>”(img by category 9) />

    Thanks

  141. Hi,
    In index.php, how to echo by catgory id
    <a href="" title=""><img src="term_id); ?>" (img by category_id=9) />

    http://pastebin.com/75WjL8hx

  142. hello Zahlan, thx for the great plugin, i have a problem to show parent category only with the category thumbs that linked to the child category, can you help me.. thx again

  143. Hi everyone, i’m trying to set this code in my single.php, but doesn’t work :(.
    help me please.

  144. Hello Zahlan. My name is Hardeep. From last two times when i updated the plugin in my site. The image icons and image paths are stopped to show in Category Quick Edit Mode. After a long time check i found that you are using
    ” $(“a.editinline”).live(“click”, function(){ ”
    Now i changed it to
    $(“#the-list”).on(“click”, “a.editinline”, function(){
    and it is working well now. Please correct this in your code so i could use your plugin next updates without any problem. Please check.

    Thanks

  145. This is really a great plugin. Thank you for your great work and see how i use it on my site (category image as logo)!

  146. I’ve implemented the code below, to show images along with the various categories/subcategories.

    $id );
    foreach (get_categories($args) as $cat) : ?>

    <a href="term_id); ?>"><img src="term_id); ?>" />
    <a href="term_id); ?>">cat_name; ?>

    I would now like to add the wordpress post loop code into an if/else statement if the user has reached the last subcategory, so that the actual posts appear. Can anyone help me with this? Many thanks.

  147. If anyone us interested, here is a simple way for adding a conditional statement for this plugin, so if there is an image uploaded show the thumbnail if not show nothing at all, that also uses your own custom thumbnail sizes:

    <img src="" alt="Your Image Alt Text">

  148. Ok, that got stripped! *PHP* stands for opening and closing PHP statements, hope that makes sense!


    *PHP* $catimage = z_taxonomy_image_url(NULL, 'Your Image Size');
    if(!empty($catimage)){ *PHP*

    *PHP* } *PHP*

  149. Have to love comments sections – here is the conditional statement in a Pastebin

    http://pastebin.com/QcVd9UkQ

  150. I have created a custom post type of “productcategory” and would like to display the parent categories. Once you click on these you can then see the sub categories.
    Here’s the code that I’ve got so far, which shows ALL of the categories http://pastebin.com/bpnFWCbE
    I’ve tried a few combinations, including this: http://pastebin.com/gLvtgiQr but I haven’t figured it out yet.
    Can anyone help me change this to only show parent categories?
    Many thanks!!

  151. How do I get the image to display on the post in the category? I’ve got the image displaying on the category page but not on the actual post.

  152. For the tag.php page you can use

    <a href="term_id, 'post_tag'); ?>"><img class="tag-img" src="term_id); ?>" />

  153. how can i use it in Homepage ???

  154. One of the most useful plugin for WordPress, it’s a must. Plus, these docs are quite explanatory for frontend developers like me. Thanx a lot for developing!

  155. Hi,Zahlan

    I want when I click on one of the categories of posts related to that category page to single.php kept and the Lamb

    Sorry, I can not speak good English

  156. Hi! I have Wp last version, but I have a plug-in does not work. In categories no image field.

  157. Hello,
    Zahlan, how can i add Category image in JQueryUI AutoComplete Search Result as a thumbnail?

  158. Hi

    Im trying to get orderby random to work but for some reason it doesnt. any help would be appreciated.

    foreach (get_terms('actors' ,
    array(
    "orderby" => "rand",
    "number" => 5,
    'hide_empty' => 1,

    )) as $cat) :

  159. Hi I can’t work out where to enter the code to make my categories use thumbnails

    could you give more instructions please

    thanks

  160. hi i want to use icon in custom post type loop how to use when i use this code term_id); ?> but all post show same icon all post

    thanks

  161. Hey just wanted to say thanks for this. Works perfectly with my custom taxonomies to build a nice looking taxonomy archive page! Niiiice!

  162. Can you tell us more about this? I’d want to find out more
    details.

  163. Hi I’m using

    <a href="term_id, 'gallery'); ?>" class="thumb">
    <img src="term_id, 'medium'); ?>" />

    cat_name; ?>
    Videos


    So I want to display categories of custom post type wich is called gallery but with the code above nothing shows.

  164. dear

    Zahlan,

    can you help, how to use the feature that show only per posts?

  165. How would I add this into the walker category class?… I’ve tried this http://pastebin.com/qxWUepnS but with no luck. Any help will be greatly appreciated!! Thanks!!

  166. One thing that goes in complete favor of corporate apartments is that there are no hidden charges.
    Serviced apartments Sydney offer a home like environment.
    Chennai serviced apartments deliver outstanding amenities to the
    guests thus they are treated with special care and concern.
    You may start wondering, where to go and whom to consult for small enquiries.

  167. Obviously, it is not that simple to operate a small company because a tremendous amount
    of work is needed. The biggest advantages of outsourcing bookkeeping services for businesses is that they don’t have to worry
    about hiring trained and efficient accountants and further create
    an in-house bookkeeping department. If your Micro Small Business Australia is ever audited
    by the ATO you will need to produce these Tax
    Invoices to verify the GST Credits you have claimed back in your BAS Statements.

    Double-entry bookkeeping requires recording of each transaction twice using debits and
    credits which serves as a type of error protection system.

  168. During that time, the idea of Nintendo is very far-fetched because no one ever thought that games can be played using
    gestures of the players. Fix one of the most common problems with your Playstation PS3:.
    Since 1990, EA (FIFA) and Konami (PES) have been battling for the front seat in football games.

    Visit my webpage :: 374646 solid;border-left:1px

  169. What’s up, yes this article is truly fastidious and I have learned lot of
    things from it on the topic of blogging. thanks.

  170. What’s up to every one, the contents existing at this site
    are actually awesome for people experience, well, keep up the nice work fellows.

  171. The EPA, the US Public Health Service, and the American Dental Association (ADA), waived all testing requirements, and encouraged cities to add the radioactive concentrate into America’s
    drinking water as an “improved” form of fluoride.
    Now Avon is one of the largest companies in the industry with a turnover of more than $8 billion and upwards of 5 million distributors across the world.
    The best part is Avon representatives can make a good amount of money.

  172. Our company is passing along free samples of premium goodies.
    To become qualified to receive, simply reply to
    our comment with your address and we’ll mail it out
    within the next working day.

  173. Hi there, just became alert to your blog through Google, and
    found that it’s really informative. I’m gonna watch out for
    brussels. I will be grateful if you continue this in future.
    A lot of people will be benefited from your writing.
    Cheers!

  174. How would you use this with Advanced custom fields. WIth a repeater or a relationship for example?

  175. Dear Zahlan

    Thank you for the app, however since I have upgraded by PlayMag app, the option to add an image in categories has vanished. Please help me with that.
    Rachit

Trackbacks/Pingbacks

  1. Categories images plugin modified to save image ID | Ed Townend - [...] very quickly (and badly) hacked up Zahlan’s excellent Categories Images plugin to save image IDs rather than the absolute …
  2. Wordpress Kategorilere Resim Ekleme | Uğur ÖZER - [...] http://zahlan.net/blog/2012/06/categories-images/ [...]
  3. Matrak Site » Blog Archive » WordPress Kategorilere Resim Ekleme - [...] http://zahlan.net/blog/2012/06/categories-images/ [...]
  4. Categories Images wordpress plugins seo | wordpress plugins - [...] Go to http://zahlan.net/blog/2012/06/categories-images/ [...]
  5. Categories Images wordpress affiliate plugins plr | wordpress plugins - [...] Go to http://zahlan.net/blog/2012/06/categories-images/ [...]
  6. Menambahkan gambar untuk Kategori - Mang Memed - [...] dengan pertimbangan dia support juga custom taxonomy dan cukup baik terdokumentasikan di http://zahlan.net/blog/2012/06/categories-images/ [...]
  7. WordPress 为分类添加图片的插件:Categories Images | wordpress教程 - […] 更多说明,请访问 http://zahlan.net/blog/2012/06/categories-images/ […]
  8. Featured Images to Categories - Wordpress - Williams Graphics - […] truly understand, a plugin is the best option. You’ll need this obviously named “Categories Images” plugin. I’ve seen other …
  9. Add Custom Fields to Category and other Taxonomies - Clone Templates - […] wordpress theme, I have to add a custom icon image for each category. I’ve tried the Category Images plugin …

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>