display tags as images in content.php
-
I want to display for a specific tag a specific image:
<?php if (has_tag('109')) : ?> <img src="<?php bloginfo('template_url'); ?>/images/icon_baby.png" class="iconc" /> <?php elseif (has_tag('118')) : ?> <img src="<?php bloginfo('template_url'); ?>/images/icon_kleinkind.png" class="iconc" /> <?php elseif (has_tag('127')) : ?> <img src="<?php bloginfo('template_url'); ?>/images/icon_kindergartenkind.png" class="iconc" />
This is working very well. But if I have more tags, the images doesen’t show!
<?php elseif (has_tag('109,127')) : ?> <img src="<?php bloginfo('template_url'); ?>/images/icon_baby.png" class="iconc" /> <img src="<?php bloginfo('template_url'); ?>/images/icon_kleinkind.png" class="iconc" />
What am I doing wrong?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘display tags as images in content.php’ is closed to new replies.