Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if (!defined('FW')) die('Forbidden'); ?>
- <div class="portfolio">
- <?php $i = 0; $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => -1)); ?>
- <?php while ($loop->have_posts()) : $loop->the_post(); ?>
- <?php echo ($i == 0 && !$right ? '<div class="row">' : ''); ?>
- <?php echo ($i == 0 && $right ? '<div class="row flex-row-reverse">' : ''); ?>
- <?php echo ($i == 0 ? '<div class="col-xl-5 col-lg-8"><div class="row">' : ''); ?>
- <?php if ($i == 0 || $i == 1) : ?>
- <a class="small item col-xl-12 col-lg-6 col-md-6" href="<?php the_permalink(); ?>" title="<?php echo get_field('titel'); ?>">
- <div class="image" style="background-image: url(<?php echo get_field('afbeelding')['url']; ?>);" data-hover="<?php echo get_field('bewegende_afbeelding')['url']; ?>" data-default="<?php echo get_field('afbeelding')['url']; ?>">
- <?php get_template_part('templates/component/component', 'record'); ?>
- <div class="info">
- <h2 class="title"><?php echo get_field('titel'); ?></h2>
- <h3 class="client"><?php echo get_field('klant'); ?></h3>
- </div>
- <div class="view">
- klik om <br /> te bekijken
- <i class="fa fa-long-arrow-right" aria-hidden="true"></i>
- </div>
- </div>
- </a>
- <?php endif; ?>
- <?php echo ($i == 1 ? '</div></div>' : ''); ?>
- <?php if ($i == 2) : ?>
- <a class="col-xl-7 col-lg-4 large item" href="<?php the_permalink(); ?>" title="<?php echo get_field('titel'); ?>">
- <div class="image" style="background-image: url(<?php echo get_field('afbeelding')['url']; ?>);" data-hover="<?php echo get_field('bewegende_afbeelding')['url']; ?>" data-default="<?php echo get_field('afbeelding')['url']; ?>">
- <?php get_template_part('templates/component/component', 'record'); ?>
- <div class="info">
- <h2 class="title"><?php echo get_field('titel'); ?></h2>
- <h3 class="client"><?php echo get_field('klant'); ?></h3>
- </div>
- <div class="view">
- klik om <br /> te bekijken
- <i class="fa fa-long-arrow-right" aria-hidden="true"></i>
- </div>
- </div>
- </a>
- <?php endif; ?>
- <?php echo ($i == 2 ? '</div>' : ''); ?>
- <?php
- if ($i == 2) {
- $i = 0;
- $right = !$right;
- } else {
- $i++;
- }
- ?>
- <?php endwhile; ?>
- </div>
- <?php wp_reset_postdata(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement