Maak een bestand layout.php en laad deze in op elke pagina door middel van onderstaande code
<?php include('layout.php');?>
Plak vervolgens in de layout.php het volgende
<?php
if ( ! post_password_required() ) {
if( have_rows('blokken') ):
$count = 0;
while ( have_rows('blokken') ) : the_row();
$count++;
$zichtbaar_op_mobile = get_sub_field('zichtbaar_op_mobile');
$zichtbaar_op_tablet = get_sub_field('zichtbaar_op_tablet');
$zichtbaar_op_desktop = get_sub_field('zichtbaar_op_desktop');
$zichtbaar_op_xl_desktop = get_sub_field('zichtbaar_op_xl_desktop');
$padding_top = get_sub_field('padding_top');
$padding_bottom = get_sub_field('padding_bottom');
$hoogte = get_sub_field('hoogte');
$divid = get_sub_field('divid');
if( get_row_layout() == 'content_blok' ):?>
<div class="container-fluid content <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>" <?php if($divid):?>id="<?php echo $divid;?>"<?php endif; ?> <?php echo $count; ?>>
<div class="container">
<div class="row">
<?php $aantalkolommen = get_sub_field('aantal_kolommen');
if ($aantalkolommen == 2):?>
<div class="col-xs-12 col-sm-12 col-md-6 lftcol">
<?php the_sub_field('tekst_kolom_1');?>
</div>
<div class="col-xs-12 col-sm-12 col-md-6 rghtcol">
<?php the_sub_field('tekst_kolom_2');?>
</div>
<?php elseif ($aantalkolommen == 3):?>
<div class="col-xs-12 col-sm-12 col-md-4">
<?php the_sub_field('tekst_kolom_1');?>
</div>
<div class="col-xs-12 col-sm-12 col-md-4">
<?php the_sub_field('tekst_kolom_2');?>
</div>
<div class="col-xs-12 col-sm-12 col-md-4">
<?php the_sub_field('tekst_kolom_3');?>
</div>
<?php else: ?>
<div class="col-xs-12 col-sm-12 col-md-12">
<?php the_sub_field('tekst_kolom_1');?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'blog_overzicht'): ?>
<div class="container-fluid blgovrzicht<?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>" <?php if($divid):?>id="<?php echo $divid;?>"<?php endif; ?> <?php echo $count; ?>>
<div class="container">
<ul id="filters">
<li><a href="#" data-filter="*" class="selected">Alle</a></li>
<?php
$terms = get_terms( 'category', array(
'hide_empty' => true,
) );
$count = count($terms); //How many are they?
if ( $count > 0 ){ //If there are more than 0 terms
foreach ( $terms as $term ) { //for each term:
echo "<li><a href='#' data-filter='.".$term->slug."'>" . $term->name . "</a></li>\n";
//create a list item with the current term slug for sorting, and name for label
}
}
?>
</ul>
<div id="isotope-list">
<div class="grid-sizer"></div>
<?php
$args = array(
'post_type' => 'post',
"post_status" => "publish",
/*"tax_query" => array(
array(
"taxonomy" => "verhaal_cats",
"field" => "id",
"terms" => $verhalencat
)
),*/
'posts_per_page' => 20
);
//WordPress loop for custom post type
$my_query = new WP_Query($args);
$count = 0;
while($my_query->have_posts()):
$count++;
$my_query->the_post();
//$termsArray = get_the_terms( $post->ID, "post_tag" ); //Get the terms for this particular item
$termsArray = get_the_terms( $post->ID, "category" );
$termsString = ""; //initialize the string that will contain the terms
foreach ( $termsArray as $term ) { // for each term
$termsString .= $term->slug.' '; //create a string that has all the slugs
};
?>
<?php $count++; ?>
<?php $image = get_the_post_thumbnail_url(); ?>
<div class="<?php echo $termsString; ?> grid-item">
<div class="bgimg" style="background: url('<?php echo $image;?>') no-repeat top center; background-size: cover; height: 125px;">
</div>
<div class="content">
<div class="xtra">
<?php
$posttags = get_the_tags();
if ($posttags) {
echo '<ul>';
foreach ( $termsArray as $term ) {
echo '<li>'.$term->slug.'</li>'; //create a string that has all the slugs
};
echo '</ul>';
}
?>
</div>
<h3><?php the_title(); ?></h3>
<p><?php echo wp_trim_words( get_the_excerpt(), 30, '...' );?></p>
<a href="<?php the_permalink();?>" style="display: block; text-align: right;"> Lees meer ></a>
</div>
</div>
<?php endwhile; wp_reset_postdata();?>
</div>
<script type="text/javascript">
jQuery(document).ready( function($) {
$('#isotope-list').isotope({
itemSelector: '.grid-item',
percentPosition: true,
masonry: {
columnWidth: '.grid-sizer'
}
});
});
</script>
</div>
</div>
<?php elseif( get_row_layout() == 'samenvatting_blok' ):?>
<div class="container-fluid intro <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>" <?php if($divid):?>id="<?php echo $divid;?>"<?php endif; ?> <?php echo $count; ?>>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<strong><?php the_sub_field('tekst');?></strong>
</div>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'h1_blok' ):?>
<div class="container-fluid <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<h1><?php the_sub_field('heading1'); ?></h1>
<?php if(is_singular('post')):?>
<p>Door <?php the_author();?> - <?php the_date();?></p>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'breadcrumbs' ): ?>
<div class="container-fluid brdcrms <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<?php
if ( function_exists('yoast_breadcrumb') ) :
if(is_singular( 'cases' )):
?>
<div class="breadcrumbs">
<p id="breadcrumbs"><span xmlns:v="http://rdf.data-vocabulary.org/#"><span typeof="v:Breadcrumb"><a href="/" rel="v:url" property="v:title">Home</a> > <span rel="v:child" typeof="v:Breadcrumb"><a href="/cases/" rel="v:url" property="v:title">Cases</a> > <span class="breadcrumb_last"><?php the_title();?></span></span></span></span></p>
</div>
<?php
elseif(is_singular( 'partners' )):?>
<div class="breadcrumbs">
<p id="breadcrumbs"><span xmlns:v="http://rdf.data-vocabulary.org/#"><span typeof="v:Breadcrumb"><a href="/" rel="v:url" property="v:title">Home</a> > <span rel="v:child" typeof="v:Breadcrumb"><a href="/partners/" rel="v:url" property="v:title">Partners</a> > <span class="breadcrumb_last"><?php the_title();?></span></span></span></span></p>
</div>
<?php
elseif(is_singular( 'post' )):?>
<div class="breadcrumbs">
<p id="breadcrumbs"><span xmlns:v="http://rdf.data-vocabulary.org/#"><span typeof="v:Breadcrumb"><a href="/" rel="v:url" property="v:title">Home</a> > <span rel="v:child" typeof="v:Breadcrumb"><a href="/blog/" rel="v:url" property="v:title">Blog</a> > <span class="breadcrumb_last"><?php the_title();?></span></span></span></span></p>
</div>
<?php
else :
yoast_breadcrumb('<p id="breadcrumbs">','</p>');
endif;
endif;
?>
</div>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'nieuws_blok' ):?>
<div class="container-fluid news <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>">
<div class="container">
<div class="row">
<?php
$aantalnieuws = get_sub_field('aantal_nieuwsberichten');
$args = array(
'post_type' => 'post',
'posts_per_page' => $aantalnieuws
);
//WordPress loop for custom post type
$my_query = new WP_Query($args);
$count = 0;
while($my_query->have_posts()):
$count++;
$my_query->the_post();
?>
<div class="col-xs-12 col-sm-12 col-md-12 nws">
<div class="nwscntnt">
<h2><?php the_title();?></h2>
<p><?php the_excerpt();?></p>
<a href="<?php the_permalink();?>">Lees verder</a>
</div>
</div>
<?php
endwhile;
?>
<?php wp_reset_postdata(); ?>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'cta_blok' ):?>
<div class="container-fluid cta <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>">
<div class="container">
<div class="row cntr">
<?php $count = 0; ?>
<?php while(has_sub_field('cta_blokken')): ?>
<?php $count++; ?>
<div class="col-xs-12 col-sm-6 col-md-4 ctasngl eq" id="cta<?php echo $count; ?>">
<img src="<?php the_sub_field('afbeelding'); ?>" alt="<?php the_sub_field('titel'); ?>"/>
<h2><?php the_sub_field('titel'); ?></h2>
<p><?php the_sub_field('tekst'); ?></p>
<?php if (get_sub_field('hubspot_button')):?>
<?php the_sub_field('hubspot_button_code'); ?>
<?php else: ?>
<a href="<?php the_sub_field('url'); ?>" class="btn">
> <?php the_sub_field('button_tekst'); ?>
</a>
<?php endif; ?>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'header' ):
$bgcontainer = get_sub_field('header_afbeelding');
if ($bgcontainer):?>
<div class="container-fluid hdr <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="background: url('<?php echo $bgcontainer; ?>') no-repeat center center; background-size: cover; <?php if($hoogte):?>height: <?php echo $hoogte; ?>px;<?php endif; ?>">
<?php else: ?>
<div class="container-fluid hdr <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="background: url('/wp-content/uploads/2017/06/Softwareoplossingen-pagina.png') no-repeat center center; background-size: cover; <?php if($hoogte):?>height: <?php echo $hoogte; ?>px;<?php endif; ?>">
<?php endif; ?>
<?php if (get_sub_field('overlay_zichtbaar')):?><div class="overlay"></div><?php endif; ?>
</div>
<?php elseif( get_row_layout() == 'video_blok' ): ?>
<div class="container-fluid hdrvideo <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>">
<?php $video = get_sub_field('video_id'); ?>
<script>
$('.hdrvideo').YTPlayer({
fitToBackground: true,
videoId: '<?php echo $video; ?>',
playerVars: {
modestbranding: 0,
autoplay: 1,
controls: 0,
showinfo: 0,
wmode: 'transparent',
branding: 0,
rel: 0,
autohide: 0,
origin: window.location.origin
}
});
</script>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<h1><?php the_sub_field('titel'); ?></h1><br/>
<a href="<?php the_sub_field('button_1_link'); ?>" class="btn"><?php the_sub_field('button_1'); ?></a> <a href="<?php the_sub_field('button_2_link'); ?>" class="btn"><?php the_sub_field('button_2'); ?></a>
</div>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'cases_blok' ): ?>
<div class="container-fluid cases <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>">
<div class="row">
<?php
$aantalcases = get_sub_field('aantal_cases');
$args = array(
'post_type' => 'cases',
'posts_per_page' => $aantalcases,
'orderby' => 'rand'
);
//WordPress loop for custom post type
$my_query = new WP_Query($args);
$count = 0;
while($my_query->have_posts()):
$count++;
$my_query->the_post();
?>
<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
<div class="col-xs-12 col-sm-6 col-md-3 case" style="background: url('<?php echo $url; ?>') no-repeat center center; background-size: cover;">
<a href="<?php the_permalink();?>">
<div class="overlay"></div>
<div class="cntnt">
<img src="<?php the_field('case_logo'); ?>" class="cslgo" />
</div>
<div class="more clear"><img src="<?php the_field('case_logo'); ?>" class="cslgos" /><span>Lees meer ></span></div>
</a>
</div>
<?php
endwhile;
?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<?php elseif( get_row_layout() == 'contact_blok' ): ?>
<?php $contgactbg = get_sub_field('afbeelding');
if ($contgactbg):?>
<div class="container-fluid contact <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="background: url('<?php echo $contgactbg; ?>') no-repeat center center fixed; background-size: cover" <?php if($divid):?>id="<?php echo $divid;?>"<?php endif; ?>>
<?php else: ?>
<div class="container-fluid contact <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="background: url('/wp-content/themes/trivento/assets/img/contact.png') no-repeat center center fixed; background-size: cover;" <?php if($divid):?>id="<?php echo $divid;?>"<?php endif; ?>>
<?php endif; ?>
<div class="container">
<div class="row">
<?php $uitlijning = get_sub_field('uitlijning'); ?>
<div class="col-xs-12 col-sm-12 col-md-7 <?php if($uitlijning == 'links'):?> <?php elseif($uitlijning == 'midden'):?>col-md-push-2 <?php else:?>col-md-push-5<?php endif; ?>">
<div class="whtbcl">
<h2><?php the_sub_field('titel'); ?></h2>
<?php the_sub_field('hubspot_formulier_code'); ?>
</div>
</div>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'whitepaper_blok' ): ?>
<?php $whtepaprbg = get_sub_field('afbeelding');
if ($whtepaprbg):?>
<div class="container-fluid whitepaper <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="background: url('<?php echo $whtepaprbg; ?>') no-repeat center center; background-size: cover" <?php if($divid):?>id="<?php echo $divid;?>"<?php endif; ?>>
<?php else: ?>
<div class="container-fluid whitepaper <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="background: url('/wp-content/themes/trivento/assets/img/contact.png') no-repeat center center; background-size: cover;" <?php if($divid):?>id="<?php echo $divid;?>"<?php endif; ?>>
<?php endif; ?>
<div class="container-fluid">
<div class="row">
<div class="col-xs-10 col-xs-push-1 col-sm-12 col-sm-push-2 col-md-7 col-md-push-5 col-lg-6 col-lg-push-5">
<div class="row row-eq-height">
<div class="grdntbcl col-xs-12 col-sm-5 col-md-5">
<h2><?php the_sub_field('vraagstuk'); ?></h2>
<img src="/wp-content/themes/trivento/assets/img/r.png" class="rimg"/>
</div>
<div class="whtbcl col-xs-12 col-sm-4 col-md-5">
<h3><?php the_sub_field('titel'); ?></h3>
<p><?php the_sub_field('tekst'); ?></p>
<?php the_sub_field('hubspot_formulier_code'); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'vacature_blok_tijdelijk' ): ?>
<div class="container-fluid vacst <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<h2><?php the_sub_field('titel'); ?></h2><br/>
<?php if( have_rows('vacatures') ):?>
<?php $count = 0; ?>
<ul class="vacslider">
<?php while ( have_rows('vacatures') ) : the_row(); ?>
<?php $count++; ?>
<li class="slide">
<a href="<?php the_sub_field('link'); ?>" class="blcklnk">
<?php $vacafbeedling = get_sub_field('afbeelding'); ?>
<div class="vacafb" style="background: url('<?php echo $vacafbeedling; ?>') no-repeat; background-size: cover;">
<div class="overlay">
<h3><?php the_sub_field('titel'); ?></h3>
<a class="button" href="<?php the_sub_field('link'); ?>">Bekijk vacature</a>
</div>
</div>
</a>
</li>
<?php endwhile; else : endif; ?>
</ul>
</div>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'watzoekenwij_blok' ):?>
<div class="container-fluid eignshpn <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>">
<div class="container">
<div class="row">
<?php if( have_rows('eigenschappen') ):?>
<?php $count = 0; ?>
<?php while ( have_rows('eigenschappen') ) : the_row(); ?>
<?php $count++; ?>
<div class="col-xs-12 col-sm-12 col-md-6 wzijb">
<div class="greybg">
<h3><?php the_sub_field('titel'); ?></h3>
<p><?php the_sub_field('tekst'); ?></p>
<?php if (get_sub_field('afbeelding')):?>
<img src="<?php the_sub_field('afbeelding'); ?>" alt="<?php the_sub_field('naam'); ?>(<?php the_sub_field('functie'); ?>)" class="egg" />
<?php endif; ?>
<div class="inf">
<?php the_sub_field('naam'); ?><br/>
<?php the_sub_field('functie'); ?>
</div>
</div>
</div>
<?php endwhile; else : endif; ?>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'quote_blok' ): ?>
<div class="container-fluid quote <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" <?php if($divid):?>id="<?php echo $divid;?>"<?php endif; ?>>
<div class="container">
<div class="row">
<?php if(is_singular('post')):?>
<div class="col-xs-12 col-sm-12 col-md-10 col-md-push-1 qwt">
<?php else: ?>
<div class="col-xs-12 col-sm-12 col-md-12 qwt">
<?php endif; ?>
<h2><?php the_sub_field('titel'); ?></h2>
<?php the_sub_field('tekst');
if( get_sub_field('aantal_lijsten') == 2) {?>
<div class="row lstcols">
<div class="col-xs-12 col-sm-12 col-md-6">
<?php $count = 0; ?>
<ul class="chck">
<?php while(has_sub_field('lijst')): ?>
<?php $count++; ?>
<li><?php the_sub_field('tekst'); ?></li>
<?php endwhile; ?>
</ul>
</div>
<div class="col-xs-12 col-sm-12 col-md-6">
<?php $count = 0; ?>
<ul class="chck">
<?php while(has_sub_field('lijst2')): ?>
<?php $count++; ?>
<li><?php the_sub_field('tekst'); ?></li>
<?php endwhile; ?>
</ul>
</div>
</div>
<?php } else { ?>
<?php $count = 0; ?>
<ul class="chck">
<?php while(has_sub_field('lijst')): ?>
<?php $count++; ?>
<li><?php the_sub_field('tekst'); ?></li>
<?php endwhile; ?>
</ul>
<?php }; ?>
<p style="margin: 10px 0px;"><?php the_sub_field('tekst_onder'); ?></p>
</div>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'partners_blok' ): ?>
<div class="container-fluid partners <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<h2><?php the_sub_field('titel');?></h2>
<br/>
<ul class="slider">
<?php
$args = array(
'post_type' => 'partners',
'post__not_in' => array( $post_id->ID),
'posts_per_page' => -1
);
$my_query = new WP_Query($args);
$count = 0;
while($my_query->have_posts()):
$count++;
$my_query->the_post();
?>
<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
<li class="slide">
<a href="<?php the_permalink();?>">
<img src="<?php echo $url; ?>" class="prtnlgo" />
</a>
</li>
<?php
endwhile;?>
</ul>
<?php
wp_reset_postdata(); ?>
</div>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'blog_blok' ): ?>
<div class="container-fluid blog <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>" style="<?php if($padding_top):?>padding-top: <?php echo $padding_top; ?>px; <?php endif; ?> <?php if($padding_bottom):?> padding-bottom: <?php echo $padding_bottom; ?>px; <?php endif; ?>">
<div class="container-fluid">
<div class="row blog">
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => 3
);
//WordPress loop for custom post type
$my_query = new WP_Query($args);
$count = 0;
while($my_query->have_posts()):
$count++;
$my_query->the_post();
?>
<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
<div class="col-xs-12 col-sm-6 col-md-4 eq" style="background: url('<?php echo $url; ?>') no-repeat center center; background-size: cover;">
<div class="row">
<div class="whtbcl col-xs-10 col-xs-push-1 col-sm-8 col-sm-push-1 col-md-8 col-md-push-1">
<h3><?php the_title();?></h3>
<p><?php the_excerpt(); ?></p>
<a class="rght" href="<?php the_permalink();?>">
> Lees de blog
</a>
</div>
</div>
</div>
<?php
endwhile;
wp_reset_postdata(); ?>
</div>
</div>
</div>
<?php elseif( get_row_layout() == 'googlemap_blok' ): ?>
<div class="container-fluid gmap <?php if(!$zichtbaar_op_mobile):?>hidden-xs<?php endif; ?> <?php if(!$zichtbaar_op_tablet):?>hidden-sm<?php endif; ?> <?php if(!$zichtbaar_op_desktop):?>hidden-md<?php endif; ?> <?php if(!$zichtbaar_op_xl_desktop):?>hidden-lg<?php endif; ?>">
<?php
$location = get_sub_field('locatie');
if( !empty($location) ):
?>
<div class="acf-map" style="height: 400px;">
<div class="marker" data-lat="<?php echo $location['lat']; ?>" data-lng="<?php echo $location['lng']; ?>"></div>
</div>
<?php endif; ?>
</div>
<?php endif;
endwhile;
else :
// no layouts found
endif;
} else {
?>
<div class="container-fluid protected">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<br/>
<?php echo get_the_password_form(); ?>
</div>
</div>
</div>
</div>
<?php }; ?>
Nu is de layout builder in het thema verwerkt. De opties moeten nog worden toegevoegd door bijgaand JSON bestand te importeren. Wijzig de extensie naar .json voor import.
#acf