title: Wordpress: Get custom taxonomies and taxonomy terms
body: <p>This code is 95% working, but I need some help with the last part. I am trying to fetch all the custom taxonomies and taxonomy terms from Wordpress and display them in an unordered list. Here is my code:</p>
  
  <pre><code>$args=array('public'   =&gt; true, '_builtin' =&gt; false); 
          $output = 'names';
          $operator = 'and';
          $taxonomies=get_taxonomies($args,$output,$operator); 
          if  ($taxonomies) {
            foreach ($taxonomies  as $taxonomy ) {
              echo '&lt;a&gt;'. $taxonomy. '&lt;/a&gt;';
              $terms = get_terms("color");
              $count = count($terms);
              if ( $count &gt; 0 ){
                  echo '&lt;ul&gt;';
                      foreach ( $terms as $term ) {
                          echo "&lt;li&gt;" . $term-&gt;name . "&lt;/li&gt;";
                      }
                  echo "&lt;/ul&gt;";
              }
            }
          }
  </code></pre>
  
  <p>The problem is on line 8 where it reads <code>$terms = get_terms("color");</code>. I wrote this as a means to test the code but the problem is that Wordpress now displays the terms from the taxonomy 'color' for every taxonomy.</p>
  
  <p>How would I modify this code so that for each taxonomy Wordpress displays, it would also display the corresponding list of terms for that taxonomy?</p>