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 want to create a page that lists all the Custom Taxonomies, with each item linking to a page that will list all the terms in a given taxonomy.

I can produce a list of taxonomies using this

  'public'   => true,
  '_builtin' => false

$output = 'names'; // or objects
$operator = 'and'; // 'and' or 'or'
if  ($taxonomies) {
  foreach ($taxonomies  as $taxonomy ) {
    echo '<p>'. $taxonomy. '</p>' ;

But of course no links.

Looking at the codex there is very little information on the parameters - at least for neophyte like myself.

Any suggestions on how to output a link for each custom taxonomy?


share|improve this question
Taxonomies don't have archive pages like that, so there's nothing really to link to in this case. – chrisguitarguy Feb 24 '12 at 0:16
up vote 0 down vote accepted

Once you get $taxonomy you can perform further logic:

$tax = get_taxonomy( $taxonomy );

if( isset( $tax->has_archive ) && $tax->has_archive == true ) {
    // do output. archive will be wordpress_url + $taxonomy->name
        <a href="<?php echo site_url( $taxonomy->name ); ?>">
            <?php echo $tax->labels->name; ?>

This is untested, but you get the idea.

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.