(Wordpress PHP) How to show Categoryname.gif

CallOnMe

choooo choooo
Sep 15, 2009
424
4
0
Milan, italy
Hello
my php skills are really embarrassing

I want to show a picture with the category name instead of the date in a yootheme template

i managed to show the category name like this

<div class="date">
<?php

printf(get_the_category_list(', '))
?>
</div>

But i don't know the syntax to make it show /images/categoryname.gif
 


I don't know the theme but
<?php the_category( ', ' ); ?> is better than <?php printf(get_the_category_list(', ')) ?>

For images <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/categoryname.gif " alt="" />
 
like this it gives me syntax error:

<div class="date">
<?php

<img src="<?php echo get_stylesheet_directory_uri(); ?> /images/categoryname.gif " alt="" />
?>
</div>


it should get the category name as the file name
 
like this it gives me syntax error:

<div class="date">
<?php

<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/categoryname.gif " alt="" />
?>
</div>

You put html into php tags.

<div class="date">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/categoryname.gif " alt="" />
</div>
 
thank you for the help seozero,

it works but in this way it always show categoryname.gif what i need is to show a filename with the same name of the category so the variable $categoryname.gif