File: D:/HostingSpaces/KLeeuwen/samenbouwen.in/wwwroot/wp-content/themes/samenbouwenin/single-team.php
<?php get_header(); ?>
<?php
while ( have_posts() ) : the_post(); $teamId = $post->ID;
$functie = get_field('functie');
$detailfoto = get_field('detailfoto');
endwhile;
?>
<style>
.obtn a {
color:#fff;
}
.obtn a:hover {
text-decoration: none;
}
</style>
<div class="aftermenubar"></div>
<div class="row-fluid">
<div class="span12">
<h1><?php echo get_the_title(); ?></h1>
<div class="blueline"></div>
<h2><?php echo $functie; ?></h2>
</div>
</div>
<div class="row-fluid">
<div class="span9">
<?php
$teamId = 0;
// TO SHOW THE PAGE CONTENTS
while ( have_posts() ) : the_post(); $teamId = $post->ID; ?> <!--Because the_content() works only inside a WP Loop -->
<div class="entry-content-page">
<?php the_content(); ?> <!-- Page Content -->
</div><!-- .entry-content-page -->
<?php
endwhile; //resetting the page loop
wp_reset_query(); //resetting the page query
wp_reset_postdata();
?>
</div>
<div class="span3" style="text-align:right;">
<div class="clearfix"></div>
<img src="<?php echo $detailfoto; ?>" style="border:1px solid #ef6530; width:100%;">
</div>
</div>
<div class="row-fluid">
<div class="span12">
<h1><span class="bluetxt">IN</span> CONTACT MET</h1>
<div class="blueline"></div>
<?php gravity_form(8, false, false, false, '', false); ?>
</div>
<div class="span12" style="min-height: 400px">
<br/><br/>
<?php
// show projects assigned to this team member
$args = array(
'post_type' => array('projecten'),
'post_status' => 'publish',
'posts_per_page' => -1,
//'paged' => $paged
'meta_query' => array(
array(
'key' => 'makelaar',
'value' => $teamId,
'compare' => 'LIKE'
))
);
$query = new WP_Query($args);
$kl = 0;
?>
<style type="text/css">
.bluebox{ background-color: #2E222C; padding: 0px;}
.bluebox * { color: #eeeeee; }
.bluebox .wbtn { text-align: center; background-color: #ef6530; padding-left: 0px;}
.bluebox .wbtn a{ color: #fff; font-size: 18px;}
.mgl0 {margin-left: 0px !important;}
</style>
<div id="projectsArea">
<h1>Projecten van <?php echo get_the_title(); ?></h1>
<div class="blueline"></div>
<div class="row-fluid">
<?php
while ( $query->have_posts() ) : $query->the_post();
$locatie = get_field('plaats');
$image = get_field('hoofdafbeelding');
$newRow = ($kl % 3) == 0;
//$endRow = $kl == 3;
//var_dump($endRow);
if($newRow) {
//if($endRow) echo '</div><br>';
//echo '<div class="row-fluid">';
} ?>
<div class="span4 bluebox <?php if($newRow) echo 'mgl0'?>" style="height:473px;margin-bottom: 30px;">
<a href="<?php the_permalink()?>">
<img src="<?php echo $image['sizes']['project-medium']?>" alt="" width="100%"/><br>
<div style="margin: 20px">
<div class="title"><h3><?php echo strtoupper($locatie);?></h3></div>
<br>
<table width="100%">
<tr><td>locatie:</td><td class="w"><i><?php echo $locatie?></i></td></tr>
<tr><td>aantal woningen:</td><td class="w"><i><?php the_field('aantal_woningen')?></i></td></tr>
<tr><td>prijsklasse:</td><td class="w"><i>vanaf €<?php echo str_replace(',','.',number_format(get_field('vanaf_prijs')))?>,- VON</i></td></tr>
</table>
<br/>
<div class="wbtn"><a href="<?php the_permalink()?>">MEER INFORMATIE</a></div>
</div>
</a>
</div>
<?php
$kl++;
endwhile; ?>
</div>
</div>
<script type="text/javascript">
$("#projectsArea").fadeIn();
$('#projectsArea .bluebox').hide();
$('#projectsArea .bluebox').each(function(i) {
$(this).delay(200*i).fadeTo(100, 1);
});
</script>
<div class="clear"></div>
<br/>
<div class="obtn">
<a href="/in-het-team">ALLE TEAMLEDEN</a> </div>
<br/><br/><br/>
</div>
</div>
</div>
<?php get_footer(); ?>