• I am making a movie review site for a friend. I want to have a different icon for each category (Good, bad, etc). I did a search and found a code that looks like this:

    <img src="<?php the_category() ?>.jpg">

    Well, that doesn’t work. On the site it shows up like this:

    General.jpg”

    The image itself is named General.jpg so I don’t think it’s a problem with the file name. Any ideas as to what I should do?

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you do a search for category icons you will find a thread and a link to the plugin that can help you achieve this.

    that bit of code should work but you should probably add a path to an images directory of some kind before it

    perhaps

    <imb src="/wp-content/cat_images/<?php the_category() ?>.jpg" />

    and dont forget alt text.

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