WordPress Category Images Plugin Easily Add Category Or Taxonomy Images To WordPress

A new free WordPress plugin that adds WordPress Category Images has just been released on the official WordPress plugins directory. Categories Images easily allows you to add WordPress Category Images to a WordPress category or even a custom taxonomy. In this article I will go over how to use this plugin on your own website to add WordPress category images to your WordPress website.

Bonus Free Trial – See how to get all of your wordpress work done fast and worry free

STEP 1: Install Categories Images The WordPress Category Images Plugin

The easiest way to install a WordPress plugin is to simply go-to your WordPress admin panel and then Plugins > Add New. Type in Categories Images into the search box and click search plugins.

Once the search has completed it should be the first plugin listed in the returned results. Now simply click Install Now and the Categories Images plugin will be installed.

Install Categories Images Plugin

If you would prefer to download the Categories Images plugin in a zip format from the WordPress Plugin Directory you can do so via the link below.

STEP 2: Edit Your Themes category.php With Image Code

To actually display the images we want on our category pages you are required to add some code to your themes category.php file. We used the WordPress default twentyeleven theme for this tutorial but your existing theme should work the same.

The default code below is what the plugin author supplies to be inserted into your themes category,php. The code below however will only return the URL of your category image and not actually display an image.

<?php if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url(); ?>

To display the image correctly we need to add some HTML code to the code above, whilst we are at it we will also add a simple alt=”” tag for better SEO. This code snippet below will now achieve our goal of actually displaying the image on our category pages.

<?php if (function_exists('z_taxonomy_image_url')) { ?>
<img src="<?php echo z_taxonomy_image_url(); ?>" alt="<?php the_title(); ?>" />
<?php } ?>

Insert the code snippet above into your themes category.php file somewhere near the top of the page. Usually a good position to place this code is under the category page title, look for an H1 tag within your template file which will usually contain the page title and paste the copied code below it.

Dont worry if you get the placement wrong the first time you can always move the code around until you get a suitable display position. Once happy save your themes category.php file.

STEP 3: Adding Images To Your WordPress Categories

Now that you have the plugin installed and the code required to display the category images in our themes category.php file has been inserted you can begin to add images to your WordPress categories.

Go-to your WordPress admin panel then Posts > Categories, when adding or editing a category you will now see an input field where you can upload an image.

upload wordpress category image WordPress Category Images

Click on the image upload field and you get a pop-up with the WordPress media manager panel where you can upload your category image.

upload wordpress category image media manager WordPress Category Images

Choose your image and upload it, when uploaded click insert into post and your category image will be inserted into the empty image field. Save your category and go and view your newly uploaded image.


In this article I only showed you how to add images to your WordPress categories, the Categories Images plugin will also allow you to add images to post tags and any custom taxonomy you or an installed plugin creates. When the Categories Images plugin is used in conjunction with the WordPress category description text and styled with some HTML & CSS you can create some nice category information headings.

This plugin is pretty good although it could do with a configurable image size option which it is lacking at the moment, hopefully a feature we will see in future updates of the plugin. If your looking for an easy way to add WordPress Category Images the Categories Images plugin could be a good minimal solution for your project.

Bonus Free Trial – See how to get all of your wordpress work done fast and worry free
8 replies
  1. elzahlan
    elzahlan says:

    Thank for writing about my plugin :)here is more examples and documentationshttp://zahlan.net/blog/2012/06/categories-images/ 

    • elzahlan
      elzahlan says:

       @JoseDavidGarciaLlanos  currently my plugin does not support shortcodes, maybe in a future update, for now you can check the documentation for more information about how to use the plugin from here http://zahlan.net/blog/2012/06/categories-images/

  2. dax
    dax says:

    How to use this image in another plugin like,i want to add it in column post plugin,,how can i use this??

  3. anand
    anand says:

    When I am getting

    Fatal error: Call to undefined function z_taxonomy_image_url() in /home2/sksinfot/public_html/calibrate/wp-content/themes/calibrate_theme/template_home.php on line 71


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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=""> <s> <strike> <strong>