Support » How-To and Troubleshooting » Category Images

Category Images

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi southerngal,
    What you need to do is create a set of images, one for each category you have, and name them with a fixed pattern. For example, catimage1.gif, catimage2.gif, catimage3.gif, etc.
    Then in your main WP loop you can add this to you template:
    <img src=”images/catimage<?php echo the_category_ID() ?>.png” alt=”Category: <?php the_category() ?>” />
    I’ve just tried this and it works fine.

    Thanks Mike! I will try this tomorrow. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Category Images’ is closed to new replies.