Forums

[resolved] PHP code widget not displaying tags (2 posts)

  1. geezerd
    Member
    Posted 2 years ago #

    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(); ?>
  2. geezerd
    Member
    Posted 2 years ago #

    I found this which solves my problem.
    Anyone know why I have to do this?
    Are there any other tags I need to do this with?

Topic Closed

This topic has been closed to new replies.

About this Topic