Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. <?php if (!defined('FW')) die('Forbidden'); ?>
  2.  
  3. <div class="portfolio">
  4. <?php $i = 0; $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => -1)); ?>
  5. <?php while ($loop->have_posts()) : $loop->the_post(); ?>
  6. <?php echo ($i == 0 && !$right ? '<div class="row">' : ''); ?>
  7. <?php echo ($i == 0 && $right ? '<div class="row flex-row-reverse">' : ''); ?>
  8.  
  9. <?php echo ($i == 0 ? '<div class="col-xl-5 col-lg-8"><div class="row">' : ''); ?>
  10. <?php if ($i == 0 || $i == 1) : ?>
  11. <a class="small item col-xl-12 col-lg-6 col-md-6" href="<?php the_permalink(); ?>" title="<?php echo get_field('titel'); ?>">
  12. <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']; ?>">
  13. <?php get_template_part('templates/component/component', 'record'); ?>
  14.  
  15. <div class="info">
  16. <h2 class="title"><?php echo get_field('titel'); ?></h2>
  17. <h3 class="client"><?php echo get_field('klant'); ?></h3>
  18. </div>
  19.  
  20. <div class="view">
  21. klik om <br /> te bekijken
  22. <i class="fa fa-long-arrow-right" aria-hidden="true"></i>
  23. </div>
  24. </div>
  25. </a>
  26. <?php endif; ?>
  27. <?php echo ($i == 1 ? '</div></div>' : ''); ?>
  28.  
  29. <?php if ($i == 2) : ?>
  30. <a class="col-xl-7 col-lg-4 large item" href="<?php the_permalink(); ?>" title="<?php echo get_field('titel'); ?>">
  31. <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']; ?>">
  32. <?php get_template_part('templates/component/component', 'record'); ?>
  33.  
  34. <div class="info">
  35. <h2 class="title"><?php echo get_field('titel'); ?></h2>
  36. <h3 class="client"><?php echo get_field('klant'); ?></h3>
  37. </div>
  38.  
  39. <div class="view">
  40. klik om <br /> te bekijken
  41. <i class="fa fa-long-arrow-right" aria-hidden="true"></i>
  42. </div>
  43. </div>
  44. </a>
  45. <?php endif; ?>
  46.  
  47. <?php echo ($i == 2 ? '</div>' : ''); ?>
  48.  
  49. <?php
  50. if ($i == 2) {
  51. $i = 0;
  52. $right = !$right;
  53. } else {
  54. $i++;
  55. }
  56. ?>
  57. <?php endwhile; ?>
  58. </div>
  59.  
  60. <?php wp_reset_postdata(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement