Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array('post_type' => 'productions',
- 'tax_query' => array (
- array ( 'taxonomy' => 'directors',
- 'field' => 'id',
- 'terms' => get_the_ID()
- )
- ));
- $query = new WP_Query( $args );
- // The Query
- $the_query = new WP_Query( $args );
- // The Loop
- if ( $the_query->have_posts() ) :
- echo "<p>Productions: ";
- while ( $the_query->have_posts() ) : $the_query->the_post();
- ?>
- <?php echo (($the_query->current_post!=0)?', ':''); ?><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><?php endwhile;
- echo "</p>";
- endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement