Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // child loop
- if( have_rows('column') ) : ?>
- <div class="row">
- <?php while( have_rows('column') ) : the_row();
- //checks if display field is set to true
- if (get_sub_field('display')) :
- ?>
- <div class="column">
- <?php // checks if there is a title for the column
- if( get_sub_field('column_title')) : ?>
- <h3><?php the_sub_field('column_title'); ?></h3>
- <?php endif;
- // starts loop for column contents
- if( have_rows('column_blocks')) :
- while( have_rows('column_blocks')) : the_row();
- // Block (no icon)
- if( get_row_layout() == 'block' ) : ?>
- <div class="content-block">
- <?php
- //checks if there is a subtitle for the block
- if( get_sub_field('subtitle')) : ?>
- <h3>Something<?php the_sub_field('subtitle');?></h3>
- <?php endif; ?>
- <p><?php the_sub_field('content');?></p>
- </div>
- <?php
- //Block with icon
- elseif( get_row_layout() == 'block_with_icon' ) : ?>
- <div class="content-block">
- <div class="icon"><?php the_sub_field('icon'); ?></div>
- <div class="block-content">
- <?php
- //checks if there is a subtitle for the block
- if( get_sub_field('subtitle')) : ?>
- <h3><?php the_sub_field('subtitle');?></h3>
- <?php endif; ?>
- <p><?php the_sub_field('content');?></p>
- </div>
- </div>
- <?php endif;
- endwhile;
- endif; ?>
- </div>
- <?php endif;
- endwhile; ?>
- </div>
- <?php endif;
- // end child loop
- ?>
- </section> `
Add Comment
Please, Sign In to add comment