Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.14 KB | None | 0 0
  1. <div id="aanbod">
  2. <div class="container-fluid section-name-cont">
  3. <div class="container">
  4. <div class="row">
  5. <div class="col-xs-12 section-name"><h1>Aanbod</h1></div>
  6. </div>
  7. </div>
  8. </div>
  9. <?php
  10. $args = array(
  11. 'post_type' => 'vastgoedobject',
  12. 'meta_key' => 'status',
  13. 'meta_value' => array('Te Huur', 'Binnenkort te huur'),
  14. 'posts_per_page' =>-1,
  15. );
  16. $aanbod_query = new WP_Query( $args );
  17.  
  18. if ( have_posts() ) : while ( $aanbod_query->have_posts() ) : $aanbod_query->the_post();
  19. ?>
  20.  
  21. <div class="content-section-<?php if( $the_query->current_post%2 == 1 ){ echo 'b';}else{ echo 'a';} ?>">
  22. <div class="container">
  23. <div class="row">
  24. <div class="col-lg-5 <?php if( $the_query->current_post%2 == 1 ){ echo 'col-lg-offset-1 col-sm-push-6 ';} ?>col-sm-6 lead-parent">
  25. <div class="clearfix"></div>
  26. <a href="<?php the_permalink(); ?>"><h2 class="section-heading"><?php the_field('straat'); ?> <?php the_field('huisnummer'); ?>, <?php the_field('stad'); ?></h2></a>
  27. <span class="label label-default"><?php the_field('status'); ?></span>
  28. <span class="label label-default"><?php echo $euro ;?><?php the_field('totale_huurprijs'); ?>,-</span>
  29. <span class="label label-default"><?php the_field('verdieping'); ?></span>
  30. <span class="label label-default"><?php the_field('aantal_kamers'); ?>-kamer <?php the_field('beschrijving_vastgoed'); ?></span>
  31. <span class="label label-default"><?php the_field('totaaloppervlak'); ?> <?php echo $m2 ;?></span>
  32. <?php the_field('beschrijving'); ?>
  33. <a href="<?php the_permalink(); ?>"><button type="button" class="btn btn-default">Bekijk <?php the_field('beschrijving_vastgoed'); ?></button></a>
  34. </div>
  35. <div class="col-lg-5 <?php if( $the_query->current_post%2 == 1 ){ echo 'col-sm-pull-6';}else{ echo 'col-lg-offset-2';} ?> col-sm-6">
  36. <a href="<?php the_permalink(); ?>" class="foto-wrapper">
  37. <?php if ( !$detect->isMobile() ) {
  38. echo get_image_object_acf('img-responsive img-rounded', 'false', 'foto', '', 'fp-aanbod', 'glyphicon-share-alt');
  39. } else {
  40. echo get_image_object_acf('img-responsive img-rounded', 'false', 'foto', '', 'fp-aanbod', '');
  41. } ?>
  42. </a>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47.  
  48. <?php endwhile; else: ?>
  49.  
  50. <h1>Kampbeheer heeft momenteel niks te huur!</h1>
  51.  
  52. <?php
  53. endif;
  54. rewind_posts();
  55. ?>
  56.  
  57. <div id="onlangs-verhuurd">
  58. <div class="container-fluid section-name-cont">
  59. <div class="container">
  60. <div class="row">
  61. <div class="col-xs-12 section-name"><h1>Onlangs Verhuurd</h1></div>
  62. </div>
  63. </div>
  64. </div>
  65. <?php
  66. $args = array(
  67. 'post_type' => 'vastgoedobject',
  68. 'meta_key' => 'status',
  69. 'meta_value' => array('Verhuurd'),
  70. 'posts_per_page' => 4,
  71. );
  72. $verhuurd_query = new WP_Query( $args );
  73. ?>
  74.  
  75. <?php if ( have_posts() ) : while ( $verhuurd_query->have_posts() ) : $verhuurd_query->the_post(); ?>
  76.  
  77. <div class="content-section-<?php if( $the_query->current_post%2 == 0 ){ echo 'b';}else{ echo 'a';} ?>">
  78. <div class="container">
  79. <div class="row">
  80. <div class="col-lg-5 <?php if( $the_query->current_post%2 == 0 ){ echo 'col-lg-offset-1 col-sm-push-6 ';} ?>col-sm-6 lead-parent">
  81. <div class="clearfix"></div>
  82. <h2 class="section-heading"><?php the_field('straat'); ?>, <?php the_field('stad'); ?></h2>
  83. <?php if(get_field('totaaloppervlak')) { ?><span class="label label-default"><?php the_field('totaaloppervlak'); ?> <?php echo $m2 ;?></span><?php } ?>
  84. <?php the_field('beschrijving'); ?>
  85. </div>
  86. <div class="col-lg-5 <?php if( $the_query->current_post%2 == 0 ){ echo 'col-sm-pull-6';}else{ echo 'col-lg-offset-2';} ?> col-sm-6 foto-wrapper">
  87. <?php echo get_image_object_acf('img-responsive img-rounded', 'false', 'foto', '', 'fp-aanbod', '') ?>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92.  
  93. <?php endwhile; else: ?>
  94.  
  95. <p>Niks te weergeven hier!</p>
  96.  
  97. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement