Title: PHP code widget not displaying tags
Last modified: August 19, 2016

---

# PHP code widget not displaying tags

 *  Resolved [geezerd](https://wordpress.org/support/users/geezerd/)
 * (@geezerd)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/php-code-widget-not-displaying-tags/)
 * I’m using the code below inside of the PHP Code Widget, and it works fine, except
   TAGS won’t display.
    Doesn’t show in the source code. And it’s definitely in 
   there. Even if the_tags(); is placed above endwhile; at the end. Anyone know 
   what’s going on? Thanks
 *     ```
       <?php
       $featuredPosts = new WP_Query();
       $featuredPosts->query('showposts=5&cat=3');
       while ($featuredPosts->have_posts()) : $featuredPosts->the_post(); ?>
       <h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
       <div class="meta">
       By <?php the_author() ?>
       </div>
       <div class="storycontent">
       <?php the_excerpt(); ?>
       </div>
       <?php endwhile; ?>
       <?php the_tags(); ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [geezerd](https://wordpress.org/support/users/geezerd/)
 * (@geezerd)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/php-code-widget-not-displaying-tags/#post-1278477)
 * [I found this](http://wordpress.org/support/topic/219812?replies=2) which solves
   my problem.
    Anyone know why I have to do this? Are there any other tags I need
   to do this with?

Viewing 1 replies (of 1 total)

The topic ‘PHP code widget not displaying tags’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [geezerd](https://wordpress.org/support/users/geezerd/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/php-code-widget-not-displaying-tags/#post-1278477)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
