Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $related = array(); ?>
- <?php while (have_posts()) : the_post(); ?>
- <?php if(get_post_type() == 'Type_B' || get_post_type() == 'Type_C'){
- array_push($related, $post);
- continue;
- } ?>
- <?php endwhile; ?>
- if($related->have_posts()){
- while($related->have_posts()) { $related->the_post();
- print_r($post);
- }
- }
Add Comment
Please, Sign In to add comment