In WP3 RC I am trying to link different post types using taxonomy
I need to call a secondary loop within the main loop, the secondary loop basing it's query on the taxonomy of the parent post it is within.
Trouble I am having is that I can't get the secondary loop to only display relevant content, it just shows ALL of the posts in that type. Here the code of the secondary loop
PHP Code:<?php
/*Internal Loop
--------------*/
$taxonomies=get_the_term_list($post->ID,'Partners','','','');
$taxonomies = explode('>',$taxonomies);
$taxonomies = $taxonomies[1];
$people = new WP_Query('post_type=People&Partners='.$taxonomies);?>
<?php if ($people->have_posts()) : while ($people->have_posts()) : $people->the_post(); ?>
<?php the_title();?>
<?php the_content();?>
<?php endwhile; else:?>
<?php endif;?>
<?php
/*--------------
Internal Loop*/?>


LinkBack URL
About LinkBacks
Reply With Quote