Feature images for categories is a plugin that comes in two versions.
In this post we outline the differences between the two versions and show-off the plugin in action.
Featured Images for Categories – Free
With the free version of the plugin you can add featured images to both categories and tags. It’s very easy to use, tt works a lot like features images on pages or posts, take a look at this screen show below.
Using featured images for categories via widget
There is a number of ways to then use these images, the plugin adds a widget that can be used in any widget area and can display a group of categories by showing each categories featured image.
Using featured images for categories via short code
By using the short codes you can display a gallery of images on your post or page, again showing off a group of categories and their featured images.
Here are some example short code configurations.
Using the short code:
[FeaturedImagesCat taxonomy=’category’ columns=’2′]
you can display a two column image gallery style block on your post or page. With the free version of the plugin you can’t set the image size of the featured image but the Pro version allows you to use any registered image size (thumbnail, medium, large, custom-image-size).
You can display the category name by using this version of the short code:
[FeaturedImagesCat taxonomy=’category’ columns=’2′ showCatName=’true’].
Feature images for categories Pro
With the Pro version of the plugin, you can enjoy same features as the free version plus the following:
- Support for categories, tags and custom taxonomies
- More complex set of short codes
- Support for all registered image sizes in your WordPress theme
- A widget to show a gallery of all featured images from a category/tag/custom taxonomy
- A widget to show a single featured category, tag or custom taxonomy in a widget area
- Functions available for developers to access the featured image for a category, use the images in even more ways!
Using Feature Images For Categories Pro via a widget
In the widgets you will see two kinds of featured images for categories widgets.
First is Featured Images for Categories which allows you to show all your categories or custom taxonomies. The second widget is called Featured Images for Categories – Term which allows you to choose one item of your category, tags or custom taxonomy and display it in a widget area.
To show you how it works, I’ve create a custom post type and a custom taxonomy for this demo. On the WordPress admin panel you will see custom post types displayed along side your standard posts and pages section.
The custom post type will behave almost exactly like a normal post. Here I’ve also got a custom taxonomy “Dog Breeds”.
Set your custom taxonomy featured image by editing your newly added custom taxonomy.
Go to WordPress admin panel Appearance > Widgets, drag Feature Images for Categories to your preferred widget area. Set the taxonomy to your custom taxonomy (in my case dog_breed). You can set the number of columns, image-size and the ordering of the output.
Now preview your website to see if the custom post type/custom taxonomy works.
This is an example of the output from the widget.
Here’s another view when the column is set to 2. The featured images are displayed in 2 columns.
In the first example we used Feature Images to Categories to show all items under dog breed. In this second example we will use Featured Images to Categories – Term. As explained earlier, this feature will allow you to choose one item from your selected taxonomy. In this example I’ll use the taxonomy “dog_breed” and the term “beagle”.
Set your image size and set display term to yes.
Click Save then view your changes. The widget will only show the one featured image.
Now I have changed some of the settings in the Feature Images for Categories – Term widget. Instead of the default image size thumbnail, I’ve changed it to medium and set display term to below featured image. This is the result, you see that the image size becomes bigger and the term is being displayed below the featured image.
Using feature images for categories Pro via short code
Using our short codes you can display featured images inside a page or post. Let’s look at some quick examples.
Display your custom taxonomy on a post by using this short code:
[FeaturedImagesCat taxonomy=’dog_breed’ columns=’2′ imagesize=’medium’]
…in your post editor.
Remember to replace “dog_breed” with the custom taxonomy you are using.
You can also display specific categories, tags or custom taxonomies.
Using the short code:
[FeaturedImagesCat taxonomy=’category’ columns=’2′ parentcatsonly=”true”]
This will display all your parent categories only.
The image below shows that there are 4 parent categories.
Let’s add category name using the short code:
[FeaturedImagesCat taxonomy=’category’ columns=’2′ parentcatsonly=”true” showCatName=’true’]
This will display the category name below the featured images, see the example below.
Short code quick reference
Here is a quick list of short code combinations and a short explanation for each.
Example shortcodes for the free version
[FeaturedImagesCat taxonomy=’category’ columns=’3′]
Choose to display categories in 3 columns
[FeaturedImagesCat taxonomy=’post_tag’ columns=’3′]
Choose to display tags in 3 columns
Example shortcodes for the Pro version
[FeaturedImagesCat taxonomy=’mytaxonomy’ columns=’2′]
Display a custom taxonomy
[FeaturedImagesCat taxonomy=’mytaxonomy’ columns=’3′ imagesize=’myImageSize’]
Imagesize can be set to any registered image size in your theme eg thumbnail, medium or a custom size
[FeaturedImagesCat taxonomy=’mytaxonomy’ columns=’2′ showCatName=’true’]
Choose to display the name of the category
[FeaturedImagesCat taxonomy=’mytaxonomy’ columns=’2′ showCatName=’true’ showCatDesc=’true’]
Choose to display the description of the category
[FeaturedImagesCat taxonomy=’mytaxonomy’ columns=’2′ include=’2,4,6,23′]
Choose specific category ids
[FeaturedImagesCat taxonomy=’mytaxonomy’ columns=’2′ parentcatsonly=”true”]
Show only top level categories
[FeaturedImagesCat taxonomy=’category’ columns=’2′ childrenonly=”1,4,65″ ]
Show specific child categories