View difference between Paste ID: ZcduJaSR and sftFieiz
SHOW: | | - or go back to the newest paste.
1
<?php get_header() ?>
2
3
<div class="row" id="main">
4
	<div class="large-12 columns">
5-
		<?php $query = new WP_Query('post'); ?>
5+
		<ul class="small-block-grid-3 large-block-grid-6">
6-
		<?php if (have_posts()) { ?> 
6+
		<?php
7-
			<ul class="small-block-grid-2 large-block-grid-6">
7+
8-
			<?php while (have_posts()) : the_post(); ?>
8+
		$lang = pll_current_language();
9
10
		$terms = get_terms( 'kunden' );
11
		
12
		foreach( $terms as $term ) :
13-
			</ul>
13+
14-
			<?php } else { ?>
14+
			$args = array(
15-
			 	<div class="row">
15+
				'post_type' => 'portfolio',
16-
			 		<div class="columns large-12">
16+
				'kunden' => $term->slug,
17-
			 			<h1><?php _e( 'Keine Projekte gefunden', 'wphajok' ); ?></h1>
17+
				'posts_per_page' => 1,
18-
			 			<p><?php _e( 'Es sind keine aktiven Projekte vorhanden.', 'wphajok' ); ?></p>
18+
				'lang' => $lang,
19-
			 		</div>
19+
			);
20-
			 	</div>
20+
			$single = new WP_Query( $args ); ?>
21-
				
21+
			<?php if ($single->have_posts()) { ?> 
22-
					
22+
23-
				
23+
			<?php while ($single->have_posts()) : $single->the_post(); ?>
24
			
25
			<?php get_template_part('project-thumb'); ?>
26
			
27
			<?php endwhile; ?>
28
			
29
			<?php } ?>
30
		<?php endforeach; ?>
31
		</ul>
32
	</div>
33
	
34
	
35
</div>
36
37
38
<?php get_footer() ?>