Created
May 6, 2014 21:11
-
-
Save emaildano/96530355839fd2c302b2 to your computer and use it in GitHub Desktop.
Starter for creating a left / right independent columns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Two Column Repeater to hold Left / Right Flexible Content Fields | |
if( have_rows('two_col_row') ): while ( have_rows('two_col_row') ) : the_row(); ?> | |
<?php | |
// left col flexible content | |
while(has_sub_field("left_column")): ?> | |
<?php if(get_row_layout() == "body_copy"): // layout: Content ?> | |
<?php the_sub_field('title'); ?> | |
<?php the_sub_field('body_copy'); ?> | |
<?php endif; ?> | |
<?php endwhile; ?> | |
<?php | |
// right col flexible content | |
while(has_sub_field("right_column")): ?> | |
<?php if(get_row_layout() == "body_copy"): // layout: Content ?> | |
<?php the_sub_field('title'); ?> | |
<?php the_sub_field('body_copy'); ?> | |
<?php endif; ?> | |
<?php endwhile; ?> | |
<?php endwhile; endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment