I'm running WordPress with custom taxonomy, added through functions.php during my theme. I'm calling posts of the certain publish key in another template during my theme but wish to restrict which of them it shows by only showing individuals posts if their taxonomy value equals the present publish title that's calling it.

So for instance: if I am around the "Red-colored Tree" album page and I am calling all posts underneath the "tunes" publish type, it might call every song. I've custom taxonomy called "disc" and I wish to restrict to simply show posts with "Red-colored Tree" choose his or her taxonomy value if you're around the red-colored tree page.

And So I simply need to say: when the post's "disc" taxonomy value is equivalent to the present page title, then continue, otherwise, don't display anything.

This is the way I'm calling posts from the "song" publish type:

<?php
   $pages = get_posts('numberposts=9999&post_type=song&post_status=publish&order=ASC&orderby=date');

   $i = 1;
   foreach( $pages as $page ) {
       $content = $page->post_title;
       if( empty($content) ) continue;

       $content = apply_filters('the_content', $content);

    if ($i%2===0) { ?><tr class="gigpress-row gigpress-alt">

       <?php } else { ?><tr class="gigpress-row"><?php } ?>

       <td><?php echo $page->post_title ?></td>
  <td><?php echo get_post_meta($page->ID, "p30-length", true); ?></td>
  <td><a href="http://itunes.com/<?php echo get_post_meta($page->ID, "p30-itunes-song", true); ?>">BUY</a></td>

  </tr>

<?php $i++;

   }    ?>

Thanks, Wade

I haven't used custom taxonomies an excessive amount of but when I recall properly the best choice is by using query_post to question taxonomies.