Display Taxonomy Tag
-
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(); ?> <?php the_title(); ?><?php echo get_query_var('taxonomy'); ?> <?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 Tag’ is closed to new replies.