WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom taxonomy 'where' and I am using this code to get taxonomy terms on single.php

<?php echo get_the_term_list( $post->ID, 'where', 'Where: ', ', ', '' ); ?>

How can I customize this code in a way if user click on 'where' terms, they should get posts of this taxonomy only from the current category.

share|improve this question

Use a taxonomy.php template?!


<?php get_header(); ?>

<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>

<h1><?php echo $term->name; ?></h1>

global $query_string;
query_posts( $query_string . '&orderby=title&order=asc' );

if (have_posts()) : 

while (have_posts()) : the_post();

<h1><a href="<?php echo get_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>

<?php endwhile; 

<?php endif; ?>

<?php get_footer(); ?>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.