Skip to content

Instantly share code, notes, and snippets.

@pierrerocket
Created February 1, 2017 21:48
Show Gist options
  • Save pierrerocket/6f0b08664934bc3565c1503bd5dddd10 to your computer and use it in GitHub Desktop.
Save pierrerocket/6f0b08664934bc3565c1503bd5dddd10 to your computer and use it in GitHub Desktop.
this calls the flex templates in my page.php file
<!--start of flex-->
<?php
if ( have_rows( 'flexible_content' ) ) :
while ( have_rows( 'flexible_content' ) ) : the_row();
if ( 'info_left_quicklinks_right' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'caption-w-buttons' );
elseif ( 'highlights_with_image_background' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'four-highlight' );
elseif ( 'red_call_to_action' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'redbar' );
elseif ( 'list_left_vid_right' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'list-left-vid-right' );
elseif ( 'imgbg-w-image' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'imgbg-caption-image' );
elseif ( 'img-bg-centered-heading' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'imgbg-caption-center' );
elseif ( 'text_left_testimonial_right' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'textleft-testimonialright' );
elseif ( 'vid_left_test_right' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'vid-left-test-right' );
elseif ( 'white-grey-boxes' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'white-grey-sidebyside' );
elseif ( 'half_and_half_layout_with_red_icons' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'halfhalf-icons' );
elseif ( 'thirds_with_icons' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'thirds-with-icons' );
elseif ( 'aaa_cares_pricing_table' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'aaa-cares-coverage' );
elseif ( 'faq_block' === get_row_layout() ) :
get_template_part( 'flex-parts/flex', 'faq' );
endif;
endwhile;
endif;
?>
<!--end of flex-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment