Create image placeholder for post tags used in loop using slug

Description

Use this code inside the loop, change the src of the image path, create tags with mathching .pngs using the slug name of the tag for example if the slug of tag is house then the phone would have to be saved as house.png (case sensitive)

Use this code inside the loop, change the src of the image path, create tags with mathching .pngs using the slug name of the tag for example if the slug of tag is house then the phone would have to be saved as house.png (case sensitive)

PHP Source Code

                        
                          <?php foreach((get_the_tags()) as $tag) { echo '<img src="http://if-media.com/wp-content/themes/ifmediaonepage/img/tagimgs/' . $tag->slug . '.png" alt="' . $tag->name . '" title="' . $tag->name . '" />'; } ?>
                        
                        
                        
                          <?php foreach((get_the_tags()) as $tag) { echo '<img src="http://if-media.com/wp-content/themes/ifmediaonepage/img/tagimgs/' . $tag->slug . '.png" alt="' . $tag->name . '" title="' . $tag->name . '" />'; } ?>
                        
                        
                        
                          <?php foreach((get_the_tags()) as $tag) { echo '<img src="http://if-media.com/wp-content/themes/ifmediaonepage/img/tagimgs/' . $tag->slug . '.png" alt="' . $tag->name . '" title="' . $tag->name . '" />'; } ?>
                        
                        
                        
                          <?php foreach((get_the_tags()) as $tag) { echo '<img src="http://if-media.com/wp-content/themes/ifmediaonepage/img/tagimgs/' . $tag->slug . '.png" alt="' . $tag->name . '" title="' . $tag->name . '" />'; } ?>
                        
                        


Post Categories