I’m not exactly sure what you mean, like a different icon beside every post title or the same icon next to every post title?
Cheers,
Michael.
I think he is looking to have an icon for each catagory and show up next to the title of his post.
i want to be able to show a different icon for each post.
Manually? Then you’ll probably want to use the custom fields.
http://codex.wordpress.org/Using_Custom_Fields
I tried the thingy at http://codex.wordpress.org/Template_Tags/get_the_category#Show_Category_Images
I put the following code in my index.php file in front of <?php the_title(); ?> … but nothing happened:
<?php foreach((get_the_category()) as $cat)
{ echo ‘<img src=”http://example.com/images/’ . $cat->cat_ID . ‘.jpg”
alt=”‘ . $cat->cat_name . ‘” />’; } ?>
The image is exactly named like the category.
Any additional explanation on how to use the code on the page mentioned above!? Please?
Eric
Edit:
DUH!!!! Ok found the flaw in my try! Picture name should be the number of the category (ID) not the name! It works!
I got it to work on my categories but is there a way similar to the above to get icons/images in my PAGE titles as well. I did experiment a bit with it but no results yet.
Is there a way to get the page_id … instead of the cat_id like in the code above?
TIA,
Eric