Inspiration For Creative Minds
Home » Labs » How to Display wordpress tags in a list  

Filed under Labs

Following code will display WordPress tags in an unordered list. Just copy and paste in your template.

 
	<?php
                $tags = get_tags();
                if ($tags) {
                        ?><ul class="tags"><?
                        foreach ($tags as $tag) {
                                echo '<li><a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a></li>';
                        }
                        ?></ul><?
                }
        ?>
It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook
Labs

Posts you may like: