WordPress.org

Support

Support » Plugins and Hacks » Hacks » Display post tags as images

Display post tags as images

Viewing 3 replies - 1 through 3 (of 3 total)
  • Matt

    @mkvoran

    Bump…. anyone?

    Hi Matt,

    I did this a while back with a nice hack/workaround, not a problem.
    I assume that when your portfolio includes css, html and photoshop work you know how to edit a template.

    The function you are looking for is probably already in your template:
    <?php the_tags( $before, $separator, $after ); ?>

    create your icons inside your template_folder/images/icons/[tag_name].jpg/png/gif

    alter the the_tags $before, $separator and $after variables accordingly.

    Haven’t tested it but should be something like this:

    <?php the_tags('<ul><li><img src="'.get_bloginfo("template_url").'/images/icons/','.jpg" /></li><li><img src="'.get_bloginfo("template_url").'/images/icons/','.jpg" /></li></ul>"); ?>

    In case the_tags() already auto-formats into a list, just use the <img />- part of the above code.

    Should at least kick you right in the right direction.
    Good luck:)

    Ah! Brilliant. Great workaround, I’ll give it a shot – I think this will work.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display post tags as images’ is closed to new replies.