Category Thumbnails is a theme feature. Category Thumbnail is an image that is chosen as the representative image for Categorys, or Custom Taxonomys. The display of this image is up to the theme. This is especially useful for "magazine-style" themes where each category has an image.
Themes have to declare their support for post thumbnails before the interface for assigning these images will appear on the Edit Post and Edit Page screens. They do this by putting the following in their functions.php file:
add_theme_support('category-thumbnails');
If your theme was successful in adding support for Category Thumbnails the "Thumbnail" button will be visible on the on the category screens. If it isn't, make sure "Category Thumbnails" is enabled.
|
|
// check if the taxonomy has a Category Thumbnail assigned to it. if(has_category_thumbnail()) { the_category_thumbnail(); }
Note: To return the Category Thumbnail for use in your PHP code instead of displaying it, use: get_the_category_thumbnail()
if(function_exists('add_theme_support')) { add_theme_support('category-thumbnails'); }
Category Thumbnails: has_category_thumbnail(), the_category_thumbnail(), get_the_category_thumbnail(), get_the_category_data()
Theme Support: add_theme_support(), remove_theme_support(), current_theme_supports()