Plugin: Category Image(s) (14 posts)

  1. davidchait
    Posted 12 years ago #

    Okay, I'll scratch converting my code over to a plugin... grrr. ;)

  2. Scott Reilly
    WordPress & Plugin Dev
    Posted 11 years ago #

    Plugin updated to v0.91
    Now supports listing multiple image extensions at once for the plugin to use to try to find a matching category image.
    Also, the functions are now prepended with "c2c_" to avoid potential conflict with other plugins or future WP core functions. So the primary plugin function is now called c2c_the_category_image.

  3. Scott Reilly
    WordPress & Plugin Dev
    Posted 11 years ago #

    Plugin updated to v1.1

    * Added argument $use_name_if_no_image=false to allow showing cat name if no image was located
    * Changed default category images directory from /wp-images/ to /wp-content/images/
    * Tweaks to update c2c_the_category_image() with changes made to the_category() (mostly rel= stuff)
    * Change to accommodate new get_category_link() arguments (fix necessary for the plugin to run in WP1.5)

    v1.0, the last version of this plugin compatible with WP1.2, is available via dev.wp-plugins.org: http://dev.wp-plugins.org/browser/category-images/tags/v1.0/

    (looks like the earlier messages in this thread are missing... In the interest of explanation for those who may not know, this plugin displays an image for each category associated with a post. The number of images displayed can be limited, and the image file extension type and file location can specified.)

  4. Jinsan
    Posted 11 years ago #

    I've been waiting for an update to this - so this gives me the perfect excuse to use it now :)

    I do have one question - is it possible to define where the image is placed, say left or right of the main content - so it sort of sits like a drop cap almost?


    <cat-image here> some text some text some text some text some text some text some text some text some text some text some text some text some text

    or something like that?

    Thanks in advance

  5. Scott Reilly
    WordPress & Plugin Dev
    Posted 11 years ago #

    Category images are given the class name "catimage" for manipulation via CSS. A rough outline for what you want:

    In index.php, add the call to this plugin just before the call to the_content, like so:

    <?php c2c_the_category_image(', '); ?><?php the_content(); ?>

    Then in your CSS do something like:

    .catimage {
    float: left;

    That's all pretty rough and generalized, and may not be quite right. Obviously you may want to customize your call to c2c_the_category_image(). And your template's call to the_content() may have an argument supplied. But that should give you the idea.

  6. Jinsan
    Posted 11 years ago #

    Cheers I'll certainly give tha a go - a bit dumb of me for not reading more :)

  7. antonskey
    Posted 11 years ago #

    is there any plans for making this compatible with WordPress 1.5 ror higher? I'd strongREALLY/strong like to be able to use this plugin.

  8. Scott Reilly
    WordPress & Plugin Dev
    Posted 11 years ago #

    Plugin updated to v1.2

    Primary change was a compatibility fix for WP 1.5.1.

  9. svenllr
    Posted 11 years ago #

    My catagory numbers do not appear in the link of the image. URI?cat= is all that shows. v0.92 showed URI?cat=0 for all catagories. If I activate pretty permalinks, then URI/catagory/ is all that shows. Yet, the mouse-over title displays the correct name of the catagory. Any ideas?


  10. Scott Reilly
    WordPress & Plugin Dev
    Posted 11 years ago #

    v1.2 is intended for WP 1.5.1 and not 1.5. Did you try v1.1 of the plugin, which is the one compatible with WP 1.5? (assuming you haven't upgraded to 1.5.1, that is).

    You can find v1.1 of the plugin here: http://dev.wp-plugins.org/file/category-images/tags/v1.1/category-images.php?rev=1816

    (scroll to the bottom of the page to download the .php or .txt version of the file)

  11. mattybinks
    Posted 11 years ago #

    Is there a way to set the category images to apply to individual Pages as well? I have created several Pages and they all use the same category image but I'd rather they have different ones. The plugin seems to only use the default category image for Pages.

  12. pieceoplastic
    Posted 10 years ago #

    sadly v1.2 of this excellent plugin will break my rss feed. and i can't seem to figure out why. can anyone help me? is anyone experiencing the same problem?

  13. Questin
    Posted 10 years ago #

    This plugin is great. I need to customize so that the image of the category is showed only if the post is recent (e.g. less than one months old). How can I do that?

  14. James Huff
    Support Team Rep.
    Posted 10 years ago #


    (Sorry, wrong post. Too many threads open at once. But, this plugin does deserve a bump, as many have been asking for it.)

Topic Closed

This topic has been closed to new replies.

About this Topic