Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. <?php
  2. $teamTitleRow = get_field('team_title_row');
  3. $teamSectionBg = get_field('team_section_background_image');
  4. ?>
  5.  
  6. <div class="avero-team-block-wrap" style="background-image:url(<?php echo $teamSectionBg; ?>)">
  7. <div class="content-wrap">
  8.  
  9. <div class="title-row">
  10. <span class="tiny-head"><?php echo $teamTitleRow['subtitle']; ?></span>
  11. <h2 class="title"><?php echo $teamTitleRow['title']; ?></h2>
  12. <div class="copy">
  13. <?php echo $teamTitleRow['content']; ?>
  14. </div>
  15. </div>
  16.  
  17. <div class="team-grid-row facet-template">
  18.  
  19. <?php
  20. // Used to trigger JS
  21. // Hidden by CSS
  22. echo do_shortcode('[facetwp facet="hidden_search_facet"]');
  23.  
  24. $args = array(
  25. 'post_type' => 'team',
  26. 'post_status' => 'publish',
  27. 'posts_per_page' => 3,
  28. 'orderby' => 'menu_order',
  29. 'order' => 'ASC',
  30. 'facetwp' => true,
  31. 'tax_query' => array(
  32. array(
  33. 'taxonomy' => 'categories',
  34. 'field' => 'slug',
  35. 'terms' => 'executives',
  36. ),
  37. ),
  38. );
  39.  
  40. $loop = new WP_Query( $args );
  41. $i = 0;
  42. $z = 0;
  43.  
  44. while ( $loop->have_posts() ) : $loop->the_post();
  45. $jobTitle = get_field('job_title');
  46. $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
  47. $additionalFields = get_field('additional_fields');
  48. ?>
  49.  
  50. <!-- <div class="grid-item" style="background-image:url(<?php // echo $backgroundImg[0] ?>)"> -->
  51. <div class="grid-item" data-modal="modal<?php echo $i++; ?>">
  52. <img src="<?php echo $backgroundImg[0] ?>" alt="">
  53. <div class="gradient layer"></div>
  54. <div class="overlay">
  55. <div class="filter layer"></div>
  56. <i class="fa fa-plus"></i>
  57. </div>
  58. <div class="meta">
  59. <h5 class="title"><?php the_title(); ?></h5>
  60. <span class="tiny-head"><?php echo $jobTitle; ?></span>
  61. </div>
  62. </div>
  63.  
  64. <!-- The Modal -->
  65. <div id="modal<?php echo $z++; ?>" class="modal-window modal">
  66.  
  67. <!-- Modal content -->
  68. <div class="modal-content">
  69. <span class="close">&times;</span>
  70.  
  71. <div class="img-col">
  72. <img src="<?php echo $backgroundImg[0] ?>" alt="">
  73. </div>
  74.  
  75. <div class="content-col">
  76. <h2 class="title"><?php the_title(); ?></h2>
  77. <span class="tiny-head"><?php echo $jobTitle; ?></span>
  78. <p><?php the_content(); ?></p>
  79. <div class="custom-fields">
  80.  
  81. <?php if( have_rows('additional_fields') ): ?>
  82. <ul class="list">
  83. <?php while( have_rows('additional_fields') ): the_row();
  84. // vars
  85. $prompt = get_sub_field('prompt');
  86. $answer = get_sub_field('answer');
  87. ?>
  88. <li class="item">
  89. <span><?php echo $prompt; ?></span>: <span><?php echo $answer; ?></span>
  90. </li>
  91. <?php endwhile; ?>
  92. </ul>
  93. <?php endif; ?>
  94.  
  95. </div>
  96. </div>
  97. </div>
  98.  
  99. </div>
  100.  
  101. <?php endwhile; ?>
  102.  
  103. <button class="fwp-load-more"><span class="tiny-head">See More</span> <i class="fa fa-plus tiny-head"></i></button>
  104.  
  105. <?php wp_reset_postdata(); ?>
  106.  
  107. </div>
  108. </div>
  109. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement