Adding icons. (3 posts)

  1. howcomical
    Posted 10 years ago #

    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:


    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?

  2. Jinsan
    Posted 10 years ago #

    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.

  3. womby
    Posted 10 years ago #

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


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

    and dont forget alt text.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.