=== Category Image ===
Contributors: pankajanupam
Tags: Category Image, admin, texonomy image, category icon
Requires at least: 2.8
Tested up to: 3.3.1
Stable tag: 1.4

The Category Image Plugin allow you to add image with category.

== Description ==

The Category Image Plugin allow you to add image with category.

Use sortcode [print-image] to display category images.

You can also use this <?php echo print_image_function(); ?> any where in your template.

== Installation ==

You can install Category Image directly from the WordPress admin panel.

Visit the Plugins > Add New and search for ‘Category Image’.

Click to install.

Once installed, activate and it is functional.

Manual Installation Category Image plugin:

Download and unzip the file

Upload the full extracted folder to the /wp-content/plugins/ directory
* Maintain the directory structure of the archive (all extracted files
should exist in ‘wp-content/plugins/category-image/’

Activate the plugin through the ‘Plugins’ menu in WordPress.

You’re done! The Plugin ready to use according to the directions in the description.

= More documentation =

Go to [http://pankajanupam.in/wordpress-plugin/category-image](http://pankajanupam.in/wordpress-plugin/category-image)

== Frequently Asked Questions ==


== Screenshots ==


== Changelog ==

= 1.3 =
add shortcode support [print-image]

= 1.2 =
javascript bug fix

= 1.1 =
javascript bug fix

= 1.0 =
first Release

  • http://www.gnanaboomi.com Gnana Boomi

    Hi Anupam,
    Its a great plugin. Thanks for that. Please check the short code for the image size as it works when the window is re-sized but defaults to the small thumbnail size when the window is maximized.

    Admin – GnanaBoomi.com

  • http://mlmblogpost.com/demo Vishal

    Thanks for a lovely plugin, 5 stars is quite less for this :)
    But I am facing some problems with this plugin, it shows fine but at some places it shows the parent category as well and it dont happen in all places. and also shows in some places where there is no image for other categories as well with a block and text link inside. Please have a look in my website.
    Any help would be appreciated.

  • Mark


    great plugin, but i need to resize the imageicon to 215 x 80 using the shortcode, i have tried the following syntax:

    [print-image width=”215″ height=”80″]

    but the size is still the default size

    can you help please?

  • http://iblogyouwedcompany.com Noelia

    Hi, great plugin, is really easy to use it!

    But I have a problem, i create a category with sub-categories, and I want in the page of the main category display the image of each sub-category, which is not working, now only shows the last sub-category in which I create a post.

    I paste in the template this code:

    Is there any way to fix it?

  • Ishak

    hi I inserted the shortcode but nothing displayed and i ‘m using version 3.3.1 could u help me plz

  • MeetWP

    Thank you for your answer.

    How do you set the icon size in the short code?

  • http://motiejusbagdonas.com Motiejus


    Nice plugin.
    I’m using the code suggested by Johan:

    $option = ‘_category_image’ . $category[$i]->cat_ID;
    $image = get_option($option);

    Which seem to work fine and I’m getting the original img url. But is there a way to output image ID instead?

    Thank you

  • MeetWP

    Hello, does your plug in support multisite?

    • http://pankajanupam.in PANKAJ ANUPAM


      • MeetWP

        Hello, how do you set the icon size in the short code?

  • sachin

    i install your plugin its working fine in add category section but i am not able to display categery image in my template by using image not showing

  • mazhar

    [print-image] not working in a loop

  • http://probizms.com Brent

    Found a bug that I am hoping you might be able to help fix. If on the category page, if there is a post that is tagged to multiple categories…it will load every image from every category that post is linked to. Hope you may be able to help with this.
    Other then this small glitch….great plugin!

  • yzqiang

    I have installed the plugin successfully and upload an image for one category. I added a new page and paste the sortcode [print-image] into it. When I open the page, there is only a block in the post and the category name show in it. The image doesn’t show at all. I have tried many times. I think the JS file didn’t work.
    I am an expert of WordPress.

    • yzqiang

      I also tried adding a new post and paste the sortcode [print-image] into it. The post is in the category with image. But the image also disappear.

    • http://pankajanupam.in PANKAJ ANUPAM

      Issue resolved please update the plugin. It will definitely work.
      Thanks to report

      • yzqiang

        You update so quickly. The problem is solved perfectly. I can see the image now. But the image is too small, rather than the normal size. Can I define the image size, like adding parameters in the shortcode?

        • http://pankajanupam.in PANKAJ ANUPAM

          Currently height is fixed to 20px. Thanks to a grate idea I will add size to as shortcode parameter soon.

          • Shauna

            Love this plugin — I would also like the icons to be larger. Any idea when you might be able to release this function??

          • http://pankajanupam.in PANKAJ ANUPAM

            You can set icon size in sortcode.

          • MeetWP

            How do you set the icon size in the short code?

  • http://preprodwp-eugeneperma.dev.insitaction.fr/category/eugene-color-produits/ Jérémie

    Hi i try with this code :

    but it show me the name of the category.

    My code :

    cat_name; ?>
    Lorem Ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incidid.Lorem
    Lire la suite de l’article >

    • http://pankajanupam.in PANKAJ ANUPAM

      Please update the plugin it will defiantly work

  • http://hydeparkatx.com sharon

    I activated the plugin and put the short code, [print-image] in a post but nothing is happening. I don’t seem to see anything else in the instructions about how to assign images to specific categories. Are you saying to add in the index.php and then use short code? thanks.

    • http://pankajanupam.in PANKAJ ANUPAM

      Go to categories edit page there you will find a new field to attach image with category

  • http://rodrigotoledo.ppg.br Rodrigo

    Hello, forgive me for confusing english, I’m using google to translate.

    I installed your plugin and found it very good, but I noticed a small bug in the source code of it. at approximately
    line 161 missing an “_” – underline category_image before the code, why not work with me.

    after I added the underline, it worked perfectly.

    • http://pankajanupam.in PANKAJ ANUPAM

      Thanks to report.

      Now fixed

  • http://www.redrocketcreative.com tite_noirode

    the shortcode is great when you use WordPress interface but what about if I want to call it in the template file ?
    I tried Johan’s suggestion but doesn’t seem to work for me.

    Any help would be great.


    • http://pankajanupam.in PANKAJ ANUPAM

      you can use < ?php echo do_shortcode('[print-image]'); ?>

  • yb

    sorry but I don’t understand what to do. where do I put the shortcode ?

    • http://pankajanupam.in PANKAJ ANUPAM

      in post or page content (editor) box. you can also add this is sidebar text widget

  • http://pcwebcenter.com Roberto

    Thanks for the plugin.
    I have a problem, I put the php function:
    in my template but I’m getting this error:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/content/44/7157744/html/home/wp-content/plugins/category-image/category-image.php on line 78

    what might be the problem?
    thank you.

    • http://pankajanupam.in PANKAJ ANUPAM

      Fatal error issue resolve. Use latest version 1.4.
      thanks for report

  • http://blog.enovision.net Johan van de Merwe


    I am using your plugin, and your site was blocked for a while, but welcome back. I would like to make one very useful recommendation to your plugin documentation.
    It would be of great help, if you give at least a sample on how to use it. That means how you can retrieve a category image from a category. It took me quite some time to figure this out, because I misread a comma for a dot in the source code.

    The way I did it is like this:

    $option = ‘_category_image’ . $category[$i]->cat_ID;
    $image = get_option($option);

    Sometimes it requires only a few lines extra in the readme.txt to save a user of your plugin a lot of time. If you enhance your readme with some useful statements about this, your plugin deserves absolutely 5 stars.

    Kind regards,


    • http://pankajanupam.in PANKAJ ANUPAM


      you can use sortcode [print-image].

    • http://hydeparkatx.com sharon

      Johan, I’m also trying to figure out how to retrieve a category image from a category. I activated the plugin and put the short code, [print-image] in a post but nothing is happening. I don’t seem to see anything else in the instructions about how to assign images to specific categories. Are you saying to add
      $option = ‘_category_image’ . $category[$i]->cat_ID;
      $image = get_option($option); to the index.php and then use short code in the post? thanks.

      • http://pankajanupam.in PANKAJ ANUPAM

        go to categories page to add categories images

  • http://www.bajumungil.com agus

    How to display the thumbnail? what code to use on my php widget?

    • http://pankajanupam.in PANKAJ ANUPAM


      you can use sortcode [print-image].