Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header() ?>
- <div class="row" id="main">
- <div class="large-12 columns">
- <ul class="small-block-grid-3 large-block-grid-6">
- <?php
- global $polylang;
- $lang = pll_current_language();
- $terms = get_terms( 'kunden' );
- foreach( $terms as $term ) :
- $args = array(
- 'post_type' => 'portfolio',
- 'kunden' => $term->slug,
- 'posts_per_page' => 2,
- 'lang' => $lang,
- );
- $single = new WP_Query( $args ); ?>
- <?php if ($single->have_posts()) { ?>
- <?php while ($single->have_posts()) : $single->the_post(); ?>
- <?php $postlang = $polylang->get_post_language(get_the_ID())->slug; ?>
- <?php if ($postlang == $lang) {
- get_template_part('project-thumb');
- } ?>
- <?php endwhile; ?>
- <?php } ?>
- <?php endforeach; ?>
- </ul>
- </div>
- </div>
- <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement