Guest User

Untitled

a guest
Feb 17th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. // child loop
  2. if( have_rows('column') ) : ?>
  3. <div class="row">
  4. <?php while( have_rows('column') ) : the_row();
  5. //checks if display field is set to true
  6. if (get_sub_field('display')) :
  7. ?>
  8. <div class="column">
  9. <?php // checks if there is a title for the column
  10. if( get_sub_field('column_title')) : ?>
  11. <h3><?php the_sub_field('column_title'); ?></h3>
  12. <?php endif;
  13. // starts loop for column contents
  14. if( have_rows('column_blocks')) :
  15. while( have_rows('column_blocks')) : the_row();
  16. // Block (no icon)
  17. if( get_row_layout() == 'block' ) : ?>
  18. <div class="content-block">
  19. <?php
  20. //checks if there is a subtitle for the block
  21. if( get_sub_field('subtitle')) : ?>
  22. <h3>Something<?php the_sub_field('subtitle');?></h3>
  23. <?php endif; ?>
  24. <p><?php the_sub_field('content');?></p>
  25. </div>
  26. <?php
  27. //Block with icon
  28. elseif( get_row_layout() == 'block_with_icon' ) : ?>
  29. <div class="content-block">
  30. <div class="icon"><?php the_sub_field('icon'); ?></div>
  31. <div class="block-content">
  32. <?php
  33. //checks if there is a subtitle for the block
  34. if( get_sub_field('subtitle')) : ?>
  35. <h3><?php the_sub_field('subtitle');?></h3>
  36. <?php endif; ?>
  37. <p><?php the_sub_field('content');?></p>
  38. </div>
  39. </div>
  40. <?php endif;
  41. endwhile;
  42. endif; ?>
  43.  
  44. </div>
  45.  
  46. <?php endif;
  47. endwhile; ?>
  48.  
  49. </div>
  50.  
  51. <?php endif;
  52. // end child loop
  53.  
  54. ?>
  55. </section> `
Add Comment
Please, Sign In to add comment