WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Plugins» How to Add Taxonomy Images “Category Icons” in WordPress

How to Add Taxonomy Images “Category Icons” in WordPress

Last updated on March 16th, 2017 by Editorial Staff
229 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Add Taxonomy Images “Category Icons” in WordPress

Do you want to add taxonomy images in WordPress? Taxonomies are a way to group things in WordPress. Categories and tags are two default taxonomies that comes built-in with every WordPress blog. In this article, we will show you how to add taxonomy images in WordPress. In other words, you will be able to add image icons for your categories, tags, and other custom taxonomies.

How to Add Taxonomy Images in WordPress

Why Add Taxonomy Images in WordPress?

Custom post types and taxonomies allow WordPress to become a full-fledged CMS. By default, WordPress comes with category and tags as two default taxonomies that you can use to sort your posts.

You can also create your own custom taxonomies and associate them with any post types on your WordPress site. This allows your users to see all other content filed under those taxonomies.

With taxonomy images, you can add featured images or icons to the terms in each taxonomy.

For example, each category on your site can have its own icon, which can be displayed on category archive pages, category lists, and so on.

Having said that, let’s take a look at how to easily add taxonomy images in WordPress.

Adding Taxonomy Images in WordPress

First thing you need to do is install and activate the Taxonomy Images plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Taxonomy Images page to configure plugin settings.

Taxonomy images settings

You will see a list of taxonomies available on your WordPress site. Select the taxonomies where you want to enable the taxonomy images feature and then click on the save changes button.

In the screenshot above, we enabled taxonomy images for categories.

To add images to each category, you will need to head over to Posts » Categories page.

If you enabled taxonomy images feature for some other taxonomy, then you will need to visit that particular taxonomy page in your WordPress admin area.

On the categories page, you will notice a new column labeled ‘Image’ in your category list. Since you haven’t added any images to categories yet, it will show a default blank image with an add button for each category.

Adding thumbnail images to your categories

Go ahead and click on the add button below the blank image. This will bring up the default WordPress media uploader popup.

You can select an image from your WordPress media library or upload a new image. After that, go ahead and repeat the process to add images for all terms in your taxonomy.

You can remove an image at any time you want by simply clicking on the remove button below the image.

Displaying Taxonomy Images on Your WordPress Site

To display taxonomy images on your WordPress site, you will need to edit your WordPress theme or child theme. If this is your first time editing WordPress files, then you may want to see our guide on how to copy paste code in WordPress.

First you will need to connect to your WordPress site using an FTP client.

Once connected, you will need to find the template responsible for displaying your taxonomy archives. This could be archives.php, category.php, tag.php, or taxonomy.php files.

You need to download the file to your computer and open it in a text editor like Notepad or TextEdit.

Now paste the following code where you want to display your taxonomy image. Usually, you would want to add it before the taxonomy title or the_archive_title() tag.

print apply_filters( 'taxonomy-images-queried-term-image', '' );

After adding the code, you need to save this file and upload it back to your website using FTP.

You can now visit the taxonomy archive page to see it display your taxonomy image. Here is how it looked on our demo archive page.

Taxonomy image on taxonomy archive page

You can use custom CSS to style this image.

Advanced users can look for more code examples on the plugin’s homepage.

We hope this article helped you learn how to easily add taxonomy images in WordPress. You may also want to see our list of 10 most wanted category hacks and plugins for WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

229 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

26 Comments

Leave a Reply
  1. Ivan says:
    Apr 12, 2018 at 3:43 pm

    Any suggestions for any other up to date plugin. Looks like the one suggested here hasn’t been updated recently.

    Reply
  2. shiv says:
    Aug 6, 2017 at 1:26 am

    how to add category images in WordPress side bar like the one in wpbeginner site ” i need help with “

    Reply
  3. pamela says:
    May 9, 2017 at 5:49 am

    What if i want to loop through all the terms and display them on one page

    Reply
  4. Gabrielle says:
    Mar 28, 2017 at 8:00 am

    Hi,i’m currently using this plugin on localhost.
    I find a strange/interesting usage for this plugin:
    Extending default WP menu, for categories links,
    to show links with background images.
    Anyone knows how to integrate this plugin filter,
    into wp menu to return
    for each menu?
    The case is complicated, do i need to use Walker class?

    Reply
  5. Jess says:
    Jan 8, 2016 at 3:50 pm

    How do I display the images used in the front end? I have a listing page and want to display the taxonomy image when ever that page has that taxonomy outputted on the page. I can’t find anything that actually shows me how to display the image on the front end. All I see is the Taxonomy label outputted by not the image.

    Thanks for your help,

    Jess

    Reply
  6. Harsha says:
    Sep 30, 2015 at 6:14 am

    Hi,
    The reason I ended in this post is I googled – featured content in wordpress

    I am actually looking at way, i can improve the related content in the wordpress.

    Because of selecting multiple categories and mutiple tags to posts, I see WordPress gets confused and does not show related content as I presume.

    So, Is taxonomies a way to improve how we show related posts, to the readers.

    And this plugin Taxonomy Images is not updated for 2 years

    Reply
    • WPBeginner Support says:
      Sep 30, 2015 at 5:29 pm

      Taxonomies can be a way to improve your related posts. But there are other tools that you can use to merge and bulk edit categories and tags.

      Reply
  7. JW says:
    May 25, 2015 at 6:48 am

    Great tutorial! Thank!

    Unfortunately it looks like this plugin isn’t supported anymore, do you know if there is an alternative?

    Or is the code still valid?

    Reply
  8. Dan Horvat says:
    Apr 23, 2015 at 12:02 am

    The most important part is missing – how to actually display those images in the front end.

    Reply
    • WPBeginner Support says:
      Apr 24, 2015 at 5:16 pm

      Please see the plugin page for detailed instructions.

      Reply
    • patrick raobelina says:
      Sep 9, 2015 at 11:10 am

      To display the image:
      $url = apply_filters( ‘taxonomy-images-queried-term-image-url’, ” );
      if ( ! empty( $url ) ) {
      echo ”;
      }

      :-)

      Reply
  9. Shinkov says:
    May 23, 2014 at 11:27 pm

    i was searching for an article that shows how to code this instead using a plugin

    Reply
  10. Gonzalo says:
    Jan 23, 2014 at 9:59 am

    How to display pictures of taxonomies in the theme?

    I used the code but does not work
    print apply_filters( ‘taxonomy-images-queried-term-image’, ” );

    Please Help?

    Reply
  11. Nicholas Worth says:
    Jan 15, 2014 at 6:32 pm

    Would make more sense if title was, “Best Plugin for Adding Images to Taxonomy in WordPress”, cause this isn’t really a tutorial about how to add images to taxonomy. Don’t mean to be a downer but I hate coming to articles that claim information but in reality they are saying this other guy knows you were hoping to here.

    Reply
    • WPBeginner Support says:
      Jan 17, 2014 at 9:31 am

      We are sorry, you felt that way. Please let us know what you mean by how to add images to taxonomy? May be we can help you find the right answer.

      Reply
      • Jacob Perl says:
        Jan 17, 2014 at 8:29 pm

        I’m guessing what Nicholas thought was the same thing I thought when I found this article: that it would be a tutorial on how to add a custom image field to taxonomies manually via coding rather than with a plugin. Still the plugin looks cool…I might check it out.

        Reply
        • Luís Felipe says:
          Feb 28, 2014 at 1:46 pm

          The same thing i thought, i was searching for an article that shows how to code this instead using a plugin
          But this is a good article anyway.

  12. lemonthirst says:
    Jan 8, 2014 at 4:36 am

    I am delighted that i have found this great plugin, it works like a charm, i ran across some minor issues on my custom posts/taxonmy but all is well now.
    Thank you guys!

    Reply
  13. Mattia says:
    May 13, 2013 at 10:18 am

    Hi, have a related question about custom taxonomies: how do you create a custom taxonomy that exists only inside a particular custom post type (like your “work” custom post type), without a plugin?
    My problem is that when I create a custom taxonomy, it appears to be also under the normal articles or the other custom post types…

    Reply
    • Editorial Staff says:
      May 13, 2013 at 10:29 am

      You would have to use register_taxonomy like so:

      register_taxonomy( 'genre', array( 'book' ), $args );

      Genre is the taxonomy and book will be the post type.

      Reply
      • Mattia says:
        May 13, 2013 at 2:58 pm

        Grazie!

        I’ll try and let you know… ;)

        Reply
  14. Banna says:
    Dec 6, 2012 at 7:00 am

    Hi,
    We are using this,
    But we cant get it work with cate ID.
    We have a Cat id we want display its thumbnail please help me to do this.

    how get thumbnail image using tax id

    Please let me know.

    Thank You
    Banna Daxxip

    Reply
  15. Ruben Boehler says:
    Jan 19, 2012 at 7:14 am

    Sorry but i can get this plugin to work…no output. Maybe i do somehing wrong?!

    i use the plugin + this code and hooked it in:

    print apply_filters( ‘taxonomy-images-list-the-terms’, ”, array( ‘image_size’ => ‘detail’, ‘taxonomy’ => ‘company’, ‘after’ => ”, ‘after_image’ => ”, ‘before’ => ”, ‘before_image’ => ”, ) );

    iam getting absolutly no output … could you help me to figure it out?

    Reply
  16. _mfields says:
    Oct 4, 2011 at 5:39 pm

    @devinsays Awesome! Thanks for the tip!

    Reply
  17. DanielPeiser says:
    Oct 3, 2011 at 8:56 am

    Sounds interesting! What if I have a few blog posts that don’t have a thumbnail image (or image in post), and there is always the same default image loaded as thumbnail in archive pages: Would the plugin load one associated to the category/tag?

    Reply
    • wpbeginner says:
      Oct 3, 2011 at 9:35 am

      @DanielPeiser You can certainly set it so it does that. Basically the steps would be like: First check if post thumbnail exist… If it doesn’t exist, then check for taxonomy image… if that doesn’t exist either, then return default thumbnail.

      Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
TrustPulse
TrustPulse
Instantly get 15% more conversions with social proof. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2021 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2021)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2021)
    • SiteGround Reviews from 4464 Users & Our Experts (2021)
    • Bluehost Review from Real Users + Performance Stats (2021)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2021 – Step by Step Guide
Deals & Coupons (view all)
SendinBlue Coupon Code
Sendinblue Coupon
Get Sendinblue, a powerful marketing automation toolkit for small businesses, for FREE.
InMotion Hosting
InMotion Hosting Coupon
Get an exclusive 50% off InMotion hosting plus a free domain.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
  • Growth Fund
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon
  • AIOSEO

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress Security by Sucuri.