Category Image(s)

Version: 1.7.3

Display an image for each category associated with a post.

Author:Scott Reilly (profile at wordpress.org)
WordPress version required:2.2
WordPress version tested:3.4.1
Plugin version:1.7.3
Added to WordPress repository:21-12-2004
Last updated:11-06-2012
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:90
Rated by:2
Plugin URI:http://coffee2code.com/wp-plugins/category-im...
Total downloads:29 820
Active installs:100+
plugin download
Click to start download

Display an image for each category associated with a post.

Notes:

This plugin provides the templates tag c2c_the_category_image() which basically reproduces and extends the functionality of WordPress's core function the_category() to add the ability to display a category image instead of the category name in the link to the category archive. With its $image_extensions argument defaulted to "", the plugin could be a drop-in replacement for the_category(). As is done in the_category(), the image or text for each category is also a link back to that category's archive.

Related info about the function:

  • If $image_extensions is defined, but no image is found for the category, then nothing is displayed for that category.
  • $image_extensions can be defined as a space separated list of image extensions. Files will be checked with the image extensions in the order those extensions were provided; default is 'png gif jpg'.
  • The number of category links/images displayed can be limited via the $limit argument
  • Category image tags are defined with class="catimage" for stylesheet manipulation.
  • The result can be filtered via the filter named "c2c_the_category_image".
  • Must be run inside "the loop".
c2c_get_category_image_list()

is another provided function, which is identical to c2c_the_category_image() except that it doesn't echo the result.

Links: Plugin Homepage | Plugin Directory Page | Author Homepage


ChangeLog