Guest User

Untitled

a guest
Jan 13th, 2016
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $reviews = false;
  2. $releases = false;
  3. if (have_posts()) : while (have_posts()) : the_post();
  4. foreach (get_the_category($post->ID) as $cat) {
  5. if (($post->post_type == 'page' || $cat->cat_ID != 9) && $reviews) {
  6. echo "<h3>Другие статьи</h3>";
  7. $reviews = false;
  8. break;
  9. }
  10. if ($cat->cat_ID == 9 && !$reviews) {
  11. echo "<h3>Обзоры</h3>";
  12. $reviews = true;
  13. break;
  14. }
  15. if ($cat->cat_ID == 16 && !$releases) {
  16. echo "<h3>РЕЛИЗЫ</h3>";
  17. $releases = true;
  18. break;
  19. }
  20. }
RAW Paste Data