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 another post type which isn't the default one. I have four taxonomies attached to that post type. And I have many tags attached to these taxonomies.

I would like to create a drop down menu that pull automatically all the tags by their taxonomy.

For example: Post type: Culture Taxonomy 1: Books Under that, all the books (tags) Taxonomy 2: Movies Under that, all the movies (tags) etc..


share|improve this question
up vote 2 down vote accepted

wp_list_categories is what you're after. It takes taxonomy as an optional argument.

Example taken from Codex:


$taxonomy     = 'genre';
$orderby      = 'name'; 
$show_count   = 0;      // 1 for yes, 0 for no
$pad_counts   = 0;      // 1 for yes, 0 for no
$hierarchical = 1;      // 1 for yes, 0 for no
$title        = '';

$args = array(
  'taxonomy'     => $taxonomy,
  'orderby'      => $orderby,
  'show_count'   => $show_count,
  'pad_counts'   => $pad_counts,
  'hierarchical' => $hierarchical,
  'title_li'     => $title

<?php wp_list_categories( $args ); ?>
share|improve this answer
That's great. I changed it to wp_dropdown_categories to get a dropdown list. I have one problem. How do I link to each category like that? I want to choose something from that menu and be linked to the correspond page. – user1341839 Jul 10 '12 at 9:49

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.