Guest User

Untitled

a guest
May 26th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. <?php $related = array(); ?>
  2. <?php while (have_posts()) : the_post(); ?>
  3. <?php if(get_post_type() == 'Type_B' || get_post_type() == 'Type_C'){
  4. array_push($related, $post);
  5. continue;
  6. } ?>
  7. <?php endwhile; ?>
  8.  
  9. if($related->have_posts()){
  10. while($related->have_posts()) { $related->the_post();
  11. print_r($post);
  12. }
  13. }
Add Comment
Please, Sign In to add comment