• Hi WordPress People,
    I have created a custom post type and have also enabled it to have taxonomies. I created a post and made a taxonomy for it called “Youth Worker”. I would like to know how can I display just the taxonomy(post tag) on my website. I don’t want to filter the custom post type by this taxonomy I simply want to use that taxonomy tag and display it somewhere on my website. this is the loop i’m trying to work with

    <?php query_posts( array('post_type' => 'staff', 'orderby' => 'rand', 'showposts' => 4)); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <li class="grid_6 staff-feature">
    <?php the_post_thumbnail(); ?>
    <a href="#">
    <div><h3><?php the_title(); ?></h3><?php echo get_query_var('taxonomy'); ?></div>
    </a>
    </li><!-- grid_6 -->
    <?php endwhile; endif; wp_reset_query(); ?>

    I have tried using echo get_query_var(‘taxonomy’); but it doesn’t display the tag or anything.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Display Taxonomy Name’ is closed to new replies.