Title: Display post tags.
Last modified: August 19, 2016

---

# Display post tags.

 *  [purplemannequin](https://wordpress.org/support/users/purplemannequin/)
 * (@purplemannequin)
 * [18 years ago](https://wordpress.org/support/topic/display-post-tags/)
 * hi, i’m currently trying to have my post tags under the post.
    but when there
   are no tags for a certain post it doesn’t show anything. but the background still
   shows.
 * i was wondering if i could use an if statement.
    so that when a tag is available
   it will echo the span.
 * [this page](http://codex.wordpress.org/Template_Tags/the_tags) shows this example:
 * (this is only part of the example)
    `<?php if (get_the_tags()) the_tags(); ?>`
 * but like i was saying how would i go about doing this?
 * what i was thinking was something like this:
    `IF TAGS ARE SET {<span class="
   tags"><?php the_tags(); ?></span><br />} END IF TAGS ARE SET`
 * **Any and All help is appreciated. :]**

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

 *  Thread Starter [purplemannequin](https://wordpress.org/support/users/purplemannequin/)
 * (@purplemannequin)
 * [18 years ago](https://wordpress.org/support/topic/display-post-tags/#post-756586)
 * bump
 *  Thread Starter [purplemannequin](https://wordpress.org/support/users/purplemannequin/)
 * (@purplemannequin)
 * [18 years ago](https://wordpress.org/support/topic/display-post-tags/#post-756587)
 * bump
 *  [Kalon](https://wordpress.org/support/users/kalon/)
 * (@kalon)
 * [18 years ago](https://wordpress.org/support/topic/display-post-tags/#post-756593)
 * Just do:
 *     ```
       <?php  the_tags(<span class="tags">',' ','</span><br />');  ?>
       ```
   
 * Then if there are no tags, nothing will show.
 * Hope that helps.

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

The topic ‘Display post tags.’ is closed to new replies.

## Tags

 * [display](https://wordpress.org/support/topic-tag/display/)
 * [if](https://wordpress.org/support/topic-tag/if/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [show](https://wordpress.org/support/topic-tag/show/)
 * [tag](https://wordpress.org/support/topic-tag/tag/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * 3 replies
 * 2 participants
 * Last reply from: [Kalon](https://wordpress.org/support/users/kalon/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/display-post-tags/#post-756593)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
