Advertisement
Guest User

Untitled

a guest
Aug 25th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <?php get_header() ?>
  2.  
  3. <div class="row" id="main">
  4. <div class="large-12 columns">
  5. <ul class="small-block-grid-3 large-block-grid-6">
  6. <?php
  7. global $polylang;
  8. $lang = pll_current_language();
  9.  
  10. $terms = get_terms( 'kunden' );
  11.  
  12. foreach( $terms as $term ) :
  13.  
  14. $args = array(
  15. 'post_type' => 'portfolio',
  16. 'kunden' => $term->slug,
  17. 'posts_per_page' => 2,
  18. 'lang' => $lang,
  19. );
  20. $single = new WP_Query( $args ); ?>
  21. <?php if ($single->have_posts()) { ?>
  22.  
  23. <?php while ($single->have_posts()) : $single->the_post(); ?>
  24.  
  25. <?php $postlang = $polylang->get_post_language(get_the_ID())->slug; ?>
  26.  
  27. <?php if ($postlang == $lang) {
  28. get_template_part('project-thumb');
  29. } ?>
  30.  
  31.  
  32. <?php endwhile; ?>
  33.  
  34. <?php } ?>
  35. <?php endforeach; ?>
  36. </ul>
  37. </div>
  38.  
  39.  
  40. </div>
  41.  
  42.  
  43. <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement