List all tags outside loop

<h3>Tags</h3>
    <ul>
    <?php $tags = get_tags();
    if ($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>

Leave a Reply

Your email address will not be published. Required fields are marked *