コード例 #1
1
ファイル: acf.php プロジェクト: Jpwaldstein/sage
function zgm_flexible_content()
{
    global $post;
    global $postid;
    global $pagetemplateclass;
    global $template;
    $postid = $post->ID;
    // get the global post and set the post id for use in get field calls and get_the_title()
    $template = explode('.', basename(get_page_template()))[0];
    // get template base name minus extension
    $pagetemplateclass = '';
    // set default for section class
    $showAlways = false;
    // set default for always show based on pre-existing setup incase felx content isnt set
    $gracefull = true;
    // check if the flexible content field has rows of data
    ob_start();
    if (have_rows('page_builder', $postid)) {
        $gracefull = false;
        // loop through the rows of data
        while (have_rows('page_builder', $postid)) {
            the_row();
            // locate and insert templates for layouts
            locate_template('templates/flexible/' . get_row_layout() . '.php', true, false);
        }
    }
    ob_end_flush();
    // end flex content
}
コード例 #2
0
/**
 * Set classes for the cover image container. These can be overridden or added to with a filter like the following:
 *     add_filter( 'cover_media_set_classes', 'custom_cover_classes' );
 *     function custom_cover_classes($classes) {
 *         if(is_page_template('template-landing-page.php') {
 *             $classes[]   = 'on-landing-page';
 *         }
 *         return $classes;
 *     }
 *
 * @return string string of classes
 */
function ci_classes()
{
    $classes = array();
    $classes[] = 'cover-media-container';
    $classes[] = 'cover-media-' . get_row_layout();
    $classes = array_filter(array_map('trim', $classes));
    echo trim(implode(' ', apply_filters('cover_media_set_classes', $classes)));
}
コード例 #3
0
 /**
  * Retrieves all the section HTML 
  * @param  String $name The slug used for the sections. Is 'sections' by default
  * @return String       The final HTML
  */
 public function getSectionsHTML($name, $post_id)
 {
     if (!$this->acf_active) {
         return '';
     }
     if (have_rows($name, $post_id)) {
         $s = 1;
         $this->html = '<div id="acfpb_sections">';
         while (have_rows($name, $post_id)) {
             the_row();
             $layout = get_row_layout();
             if (method_exists(get_class(), 'getSection_' . $layout)) {
                 $id = 'section_' . $s;
                 $class = 'acfpb_section section-' . $layout;
                 $style = get_sub_field('bg') ? 'background-color:' . get_sub_field('bg') : '';
                 $contained = (bool) get_sub_field('contained', false);
                 if (!$this->use_bs && $contained) {
                     $contained = false;
                 }
                 $wrapper = get_sub_field('wrapper_class');
                 $this->html .= '<div id="' . $id . '" class="' . $class . '" style="' . $style . '">';
                 if ($contained) {
                     $this->html .= '<div class="container">';
                 }
                 if ($contained) {
                     $this->html .= '<div class="row">';
                 }
                 if ($wrapper !== '') {
                     $this->html .= '<div class="' . $wrapper . '">';
                 }
                 $this->html .= $this->{'getSection_' . $layout}();
                 if ($wrapper !== '') {
                     $this->html .= '</div>';
                 }
                 // Wrapper finish
                 if ($this->use_bs) {
                     $this->html .= '<div class="clearfix"></div>';
                 }
                 if ($contained) {
                     $this->html .= '</div>';
                 }
                 // Row finish
                 if ($contained) {
                     $this->html .= '</div>';
                 }
                 // Container finish
                 $this->html .= '</div>';
                 // Section finish
                 $s++;
             }
         }
         $this->html .= '</div>';
         // Main Wrapper finish
         return $this->html;
     } else {
         return '';
     }
 }
コード例 #4
0
 /**
  * @return string
  */
 public static function get_sub_field_brick_class_name()
 {
     $row_layout = get_row_layout();
     $class_name = get_sub_field($row_layout . '_brick_class');
     if (is_null($class_name)) {
         die('get_sub_field_brick_instance() could not find a hidden field named ' . $row_layout . '_brick_class .');
     }
     return $class_name;
 }
コード例 #5
0
ファイル: helpers.php プロジェクト: davidroyer/modular
function the_modules_loop($modules_field = 'modules')
{
    // Loop through rows of flexible content field
    while (the_flexible_field($modules_field)) {
        // Render module template based on the row layout's name
        $module_name = str_replace('_', '-', get_row_layout());
        the_module($module_name);
    }
}
コード例 #6
0
/**
 * GRID: Half-Half Editor
 *
 * @param $languarge
 */
function feature_grid_2_2_editor($language)
{
    if (get_row_layout() == 'half-half') {
        $maxWidth = get_sub_field('22_width');
        $backgroundColor = 'background-color: ' . get_sub_field('22_background_color') . '; ';
        $padding = 'padding: ' . get_sub_field('22_padding') . '; ';
        $center = get_sub_field('22_center');
        $css = '<style>' . get_sub_field('22_box_css') . '</style>';
        $hash = md5(get_sub_field('grid_left_de'));
        # uk-margin-large-top | uk-margin-large-bottom
        $selected = get_sub_field('22_easy_margin');
        if (in_array('top', $selected)) {
            $top = 'uk-margin-large-top';
        }
        if (in_array('bottom', $selected)) {
            $bottom = 'uk-margin-large-bottom';
        }
        if ($top != '' || $bottom != '') {
            $margin = ' class="' . $top . ' ' . $bottom . '"';
        }
        if ($center != 'no') {
            $center_1 = '<center>';
            $center_2 = '</center>';
        }
        if (get_sub_field('22_animation_left') != 'no') {
            $animation_left = get_sub_field('22_animation_left');
            $a_left = 'data-uk-scrollspy="{cls:\'uk-animation-' . $animation_left . '\', repeat: false}"';
        }
        if (get_sub_field('22_animation_right') != 'no') {
            $animation_right = get_sub_field('22_animation_right');
            $a_right = 'data-uk-scrollspy="{cls:\'uk-animation-' . $animation_right . '\', repeat: false}"';
        }
        echo '<div id="ultraschall-box-' . $hash . '" style="' . $backgroundColor . '"' . $margin . '>';
        echo '<div class="uk-container uk-container-center"
                style="max-width: ' . $maxWidth . 'px;' . $backgroundColor . '' . $padding . '">';
        echo '<div class="uk-grid" data-uk-grid-margin="">';
        echo '<div class="uk-width-medium-1-2" ' . $a_left . ' data-uk-grid-margin="">';
        echo the_sub_field('grid_left_' . $language);
        echo '</div>';
        echo '<div class="uk-width-medium-1-2" ' . $a_right . ' data-uk-grid-margin="">';
        echo the_sub_field('grid_right_' . $language);
        echo '</div>';
        echo '</div>';
        echo '</div>';
        echo '</div>';
    }
}
コード例 #7
0
ファイル: flex-helpers.php プロジェクト: giorgiosaud/bej
    function show_article()
    {
        ?>
        <article id="<?php 
        the_sub_field('id');
        ?>
" class="Section__article <?php 
        the_sub_field('class');
        ?>
">
            <?php 
        if (get_row_layout() == 'html') {
            Show_html();
        }
        ?>
        </article>
        <?php 
        //
    }
コード例 #8
0
function bw_process_queue()
{
    $content = '';
    $content = get_field('intro');
    if (have_rows('queue_content')) {
        // loop through the rows of data
        while (have_rows('queue_content')) {
            the_row();
            if (get_row_layout() == 'question_and_answer') {
                $content .= '<div class="bw_queue_question">' . "\n";
                $content .= '<div class="bw_queue_question_from">' . get_sub_field('from') . '</div>' . "\n";
                $content .= '<div class="bw_queue_question_body">' . get_sub_field('question') . '</div>' . "\n";
                $content .= '</div>' . "\n";
                $content .= get_sub_field('answer');
            } elseif (get_row_layout() == 'generic_content') {
                $content .= get_sub_field('generic_content_block');
            }
        }
    } else {
        // no layouts found
    }
    $content .= get_field('outro');
    return $content;
}
コード例 #9
0
function acf_get_sub_field($selector, $field)
{
    // sub fields
    if ($field['type'] == 'repeater') {
        // extract sub fields
        $sub_fields = acf_extract_var($field, 'sub_fields');
        if (!empty($sub_fields)) {
            foreach ($sub_fields as $sub_field) {
                if ($sub_field['name'] == $selector || $sub_field['key'] == $selector) {
                    // return
                    return $sub_field;
                }
                // if
            }
            // foreach
        }
        // if
    } elseif ($field['type'] == 'flexible_content') {
        // vars
        $layouts = acf_extract_var($field, 'layouts');
        $current = get_row_layout();
        if (!empty($layouts)) {
            foreach ($layouts as $layout) {
                // skip layout if the current layout key does not match
                if ($current && $current !== $layout['name']) {
                    continue;
                }
                // extract sub fields
                $sub_fields = acf_extract_var($layout, 'sub_fields');
                if (!empty($sub_fields)) {
                    foreach ($sub_fields as $sub_field) {
                        if ($sub_field['name'] == $selector || $sub_field['key'] == $selector) {
                            // return
                            return $sub_field;
                        }
                        // if
                    }
                    // foreach
                }
                // if
            }
            // foreach
        }
        // if
    }
    // if
    // return
    return false;
}
コード例 #10
0
<?php

/********************************
 * Regular Content
********************************/
?>

<?php 
$id = isset($id) ? $id : $post->ID;
$i = 0;
if (get_field('content', $id)) {
    while (has_sub_field('content', $id)) {
        ?>
	<?php 
        $layout = get_row_layout();
        switch ($layout) {
            case 'row':
                if (get_sub_field('columns')) {
                    ?>
							
					<div <?php 
                    if (get_sub_field('anchor_id')) {
                        ?>
id="<?php 
                        the_sub_field('anchor_id');
                        ?>
"<?php 
                    }
                    ?>
 <?php 
                    if (get_sub_field('anchor_label')) {
コード例 #11
0
ファイル: front-page.php プロジェクト: 19h47/top-vacances
        the_sub_field("block_simple_title_button_link");
        ?>
" class="button uppercase background-<?php 
        the_sub_field('block_simple_title_button_color_button');
        ?>
 color-white font-size-16 margin-top-30 display-inline-block">
				<?php 
        the_sub_field("block_simple_title_button_label_button");
        ?>
			</a>
		</div>



	<?php 
    } elseif (get_row_layout() == "block_simple_button") {
        // layout: Block simple avec bouton mais pas de titre
        ?>

		<div class="site-banner background-<?php 
        the_sub_field('block_simple_button_background');
        ?>
 has-padding text-center position-relative <?php 
        if (get_sub_field('block_simple_title_button_illustration')) {
            ?>
has-illustration<?php 
        }
        ?>
">
			<div class="site-banner__content-inner-full site-banner__content-inner display-inline-block">
				<p class="site-banner__content-inner__text color-<?php 
コード例 #12
0
        } elseif (get_row_layout() == 'energy_savings_link') {
            ?>
			        <div class="box link bank">
				        <?php 
            the_field('bank_text', 'option');
            ?>
				        
					    
						<a href="<?php 
            the_field('bank_link', 'option');
            ?>
" ></a>
						<div class="clear"></div>
			        </div>
			        <?php 
        } elseif (get_row_layout() == 'call_before_you_dig_information') {
            ?>
			        <div class="box dig">				        
				        <?php 
            the_field('dig_text', 'option');
            ?>
				        <div class="clear"></div>
			        </div>
			        <?php 
        }
    }
} else {
    // no layouts found
}
?>
			
コード例 #13
0
                    ?>
									
										<?php 
                    // Vars
                    $sectionName = get_sub_field('section_name');
                    $left = get_sub_field('one_third_left');
                    $right = get_sub_field('two_thirds_right');
                    echo '<section class="third-split left-text ' . $sectionName . '"><figure><figcaption class="left slide-left">' . $left . '</figcaption><span style="background-image: url(' . $right . ');"></span></figure></section>';
                    ?>
								<?php 
                }
                ?>

								<?php 
                // No Container One Third Right Text
                if (get_row_layout() == 'no_container_third_right') {
                    ?>
									
										<?php 
                    // Vars
                    $sectionName = get_sub_field('section_name');
                    $left = get_sub_field('two_thirds_left');
                    $right = get_sub_field('one_third_right');
                    echo '<section class="third-split right-text ' . $sectionName . '"><figure><span style="background-image: url(' . $left . ');"></span><figcaption class="right slide-right">' . $right . '</figcaption></figure></section>';
                    ?>
								<?php 
                }
                ?>
																	 
						<?php 
            }
コード例 #14
0
ファイル: tabbed-page.php プロジェクト: rmikeska/ushipnetwork
  <?php 
include "template-parts/acf-modules/top-content.php";
?>

  <?php 
$thepages = array('tabbed_page_1', 'tabbed_page_2', 'tabbed_page_3', 'tabbed_page_4', 'tabbed_page_5', 'tabbed_page_6', 'tabbed_page_7');
echo '<div class="tabbedPageMenu"><ul class="tabbedPageMenu-list">';
foreach ($thepages as $thepage) {
    if (have_rows($thepage)) {
        while (have_rows($thepage)) {
            the_row();
            ?>

    <?php 
            if (get_row_layout() == 'tab_info') {
                ?>

      <?php 
                $tab_title = get_sub_field('tab_title');
                ?>
      <?php 
                $tab_hash = get_sub_field('tab_hash');
                ?>

      <li><a class="<?php 
                echo $tab_hash;
                ?>
" href="#<?php 
                echo $tab_hash;
                ?>
コード例 #15
0
                <a class="right carousel-control" href="#promo-carousel-m" role="button" data-slide="next">
                  <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                  <span class="sr-only">Next</span>
                </a>

              </div> <!-- /carousel -->
              </div>
    <?php 
                    }
                    ?>
<!--end carousel-->

<!--Post Carousel-->
            <!--Check for slide show-->
            <?php 
                    if (get_row_layout() == 'post_carousel') {
                        ?>

             <div class="news_and_events_carousel col-md-12 no-gutter content-section light-grey-bg ">
                          <div class="news_and_events_carousel-header">

                            <div class="clearfix row">
                              <?php 
                        if (get_sub_field('title')) {
                            ?>
                                <span class="col-md-6 col-md-offset-3"><h4><?php 
                            the_sub_field('title');
                            ?>
</h4></span>
                              <?php 
                        }
コード例 #16
0
                            // echo $iframe
                            echo $iframe;
                            ?>
														</div>

														<div class="caption"><?php 
                            the_sub_field("image-caption");
                            ?>
</div>

							        		</div>

												</div>

									<?php 
                        } elseif (get_row_layout() == 'gallery') {
                            ?>

										<?php 
                            $images = get_sub_field('gallery');
                            if ($images) {
                                ?>
										    <div class="media">

											    <div id="slider" class="flexslider <?php 
                                if (get_sub_field('drop-shadow')) {
                                    ?>
drop-shadow-slider<?php 
                                }
                                ?>
">
コード例 #17
0
<?php 
if (have_rows('sections')) {
    while (have_rows('sections')) {
        the_row();
        ?>

	<?php 
        get_template_part('templates/sections/_' . get_row_layout());
        ?>

<?php 
    }
}
コード例 #18
0
            while (have_rows('flexible_content_section')) {
                the_row();
                // !1 COL LAYOUT
                if (get_row_layout() == '1_col_layout') {
                    get_template_part('/template-parts/flexible', '1col-layout');
                }
                // end 1 col layout
                // !2 COL LAYOUT
                // Check if this row layout is in use
                if (get_row_layout() == '2_col_layout') {
                    // get the corresponding template part if it is
                    get_template_part('/template-parts/flexible', '2col-layout');
                }
                // end 2 col layout
                // !TESTIMONIAL LAYOUT
                if (get_row_layout() == 'testimonial_layout') {
                    get_template_part('/template-parts/flexible', 'testimonial-layout');
                }
                // end testimonial layout
            }
        }
        ?>
		</div><!-- end inner -->
	</section><!-- end flexible-content-wrapper -->
	<?php 
    }
}
?>
<!-- end repeater field -->		
</main>	
<?php 
コード例 #19
0
                echo $bgimg['sizes']['module-img'];
            }
            ?>
)"></div>
					</div>
				</div>
			</div>
		</section>
		
		<?php 
        }
        ?>


<?php 
    } elseif (get_row_layout() == "testimonial") {
        $post_object = get_sub_field('testimonial_to_display');
        if ($post_object) {
            $post = $post_object;
            setup_postdata($post);
            $sideimg = '';
            $bgimg = get_field('side_image');
            if (isset($bgimg['sizes']['module-img'])) {
                $sideimg = $bgimg['sizes']['module-img'];
            }
            ?>
	
        <section class="features-intro">
			<div class="container-fluid">
				<div class="row">
                    <div class="dotted-line gray"></div>
コード例 #20
0
ファイル: content-page.php プロジェクト: hhgr/uksoccer
<?php 
// check if the flexible content field has rows of data
if (have_rows('flexible_content')) {
    // loop through the rows of data
    while (have_rows('flexible_content')) {
        the_row();
        // check current row layout
        if (get_row_layout() == 'paragraph_with_headline') {
            echo '<h2 class="flex">';
            the_sub_field('headline');
            echo '</h2>';
            the_sub_field('body');
        }
        // check current row layout
        if (get_row_layout() == 'button_with_link') {
            echo '<a class="btn" href="';
            the_sub_field('button_link');
            echo '">';
            the_sub_field('button_text');
            echo '</a>';
            the_sub_field('body');
        }
    }
} else {
    // no layouts found
}
?>


			<?php 
コード例 #21
0
 
</div>
<?php 
// open the WordPress loop
if (have_posts()) {
    while (have_posts()) {
        the_post();
        // are there any rows within within our flexible content?
        if (have_rows('product_page_content')) {
            // loop through all the rows of flexible content
            while (have_rows('product_page_content')) {
                the_row();
                if (get_row_layout() == 'banner') {
                    get_template_part('partials/stripe', 'banner');
                }
                if (get_row_layout() == 'secondary_nav') {
                    get_template_part('partials/section', 'products');
                }
            }
            // close the loop of flexible content
        }
        // close flexible content conditional
    }
}
// close the WordPress loop
?>


<?php 
get_template_part('partials/section', 'client-logos');
?>
コード例 #22
0
<?php

cfb_template('blocks/parts/block-media', get_row_layout());
cfb_template('blocks/parts/block-cta', get_row_layout());
コード例 #23
0
            ?>
" alt="merete-bundgaard">
					<div class="aside-about-content">
						<p class="h3"><?php 
            the_field('sidebar_about_title', 'options');
            ?>
</p>
						<p><?php 
            the_field('sidebar_about_desc', 'options');
            ?>
</p>
					</div>
				</div>

	        <?php 
        } elseif (get_row_layout() == 'contactbox') {
            ?>

			    <div class="aside-item aside-contact">
		        	<h3><?php 
            the_field('sidebar_contact_title', 'options');
            ?>
</h3>
					<p><?php 
            the_field('sidebar_contact_description', 'options');
            ?>
</p>
					<a href="mailto:<?php 
            the_field('email', 'options');
            ?>
"><?php 
コード例 #24
0
ファイル: index.php プロジェクト: stefanamport/_s
            while (have_rows('inhaltszeilen', get_the_id())) {
                the_row();
                ?>

						<div id="post-<?php 
                the_ID();
                ?>
" class="container rowno<?php 
                echo $subrowCounter;
                ?>
 row-<?php 
                echo get_row_layout();
                ?>
">
							<?php 
                get_template_part('template-parts/row', get_row_layout());
                ?>
						</div>

						<?php 
                $subrowCounter++;
                ?>
				
					<?php 
            }
            ?>

				<?php 
        } else {
            ?>
					<?php 
コード例 #25
0
ファイル: front-page.php プロジェクト: joedooley/hbmi
function hbmi_display_fc()
{
    // loop through the rows of data
    while (have_rows('flexible_content')) {
        the_row();
        // "Hero" Layout
        if (get_row_layout() === 'hero_row') {
            $bg_image = get_sub_field('hero_image');
            ?>

				<section class="row content-section hero-row <?php 
            the_sub_field('css_class');
            ?>
" style="background: url(<?php 
            echo $bg_image['url'];
            ?>
); background-size: cover;">
					<div class="wrap">
						<div class="heading-container-wrap">
							<div class="hero-content">
								<?php 
            if (get_sub_field('hero_content')) {
                the_sub_field('hero_content');
            }
            ?>
							</div>
						</div>
					</div>
				</section>

			<?php 
        } elseif (get_row_layout() === 'row_with_heading') {
            $bg_color = get_sub_field('background_color');
            ?>

				<section class="row content-section <?php 
            echo the_sub_field('css_class');
            ?>
" style="background-color: <?php 
            echo $bg_color;
            ?>
;">
					<div class="wrap">
						<div class="heading-wrap">
							<h2 class="section-heading">
								<?php 
            if (get_sub_field('section_heading')) {
                the_sub_field('section_heading');
            }
            ?>
							</h2>
						</div>
						<div class="content-area">
							<?php 
            if (get_sub_field('content_area')) {
                the_sub_field('content_area');
            }
            ?>
						</div>
					</div>
				</section>


			<?php 
        } elseif (get_row_layout() === 'row_without_heading') {
            $background_image = get_sub_field('background_image') ? get_sub_field('background_image') : '';
            ?>

				<section class="row content-section <?php 
            the_sub_field('css_class');
            ?>
" style="background: url(<?php 
            echo $background_image['url'];
            ?>
); background-size: cover;">
					<div class="wrap">
						<div class="content-area">
							<?php 
            if (get_sub_field('content_area')) {
                the_sub_field('content_area');
            }
            ?>
						</div>
					</div>
				</section>

			<?php 
        }
    }
}
コード例 #26
0
ファイル: page-widgets.php プロジェクト: jhipwell6/ocp-rapid
<?php

// check if the flexible content field has rows of data
if (have_rows('page_widgets')) {
    // loop through the rows of data
    while (have_rows('page_widgets')) {
        the_row();
        ?>

		<?php 
        // check current row layout
        get_template_part('parts/page/widgets/widget', get_row_layout());
        ?>

    <?php 
    }
} else {
    // no layouts found
}
コード例 #27
0
<figure class="block-addon block-figure">
	<?php 
cfb_template('blocks/parts/media/media-gallery', get_row_layout());
?>
</figure>

コード例 #28
0
ファイル: index.php プロジェクト: sortmike/tec
                echo $imageRight['url'];
                ?>
" alt=""  width="<?php 
                echo $imageRight['width'];
                ?>
" height="<?php 
                echo $imageRight['width'];
                ?>
">
								</div>
							</div>
						<?php 
            }
            ?>
						<?php 
            if (get_row_layout() == 'custom_section') {
                ?>
							<?php 
                $customSection = get_sub_field('section');
                if ($customSection == "areamap") {
                    get_template_part('template-partials/area-map');
                } else {
                    if ($customSection == "venuemap") {
                        get_template_part('template-partials/venue-map');
                    } else {
                        if ($customSection == "googlemap") {
                            get_template_part('template-partials/google-map');
                        } else {
                            if ($customSection == "capacities") {
                                get_template_part('template-partials/capacities');
                            }
コード例 #29
0
        }
    }
}
?>



		<?php 
// various
while (have_rows('participants')) {
    the_row();
    $image = get_sub_field('image');
    $name = get_sub_field('name');
    $life = get_sub_field('life_short');
    $bio = get_sub_field('bio');
    if (get_row_layout() == 'participant') {
        echo '<div class="participant float-container L-2-3 M-1-1">';
        echo '<div class="portrait L-1-4 gutters"><img src="' . $image['sizes']['large'] . '"></div>';
        echo '<div class="L-3-4 gutters">';
        echo '<h2 class="">' . $name . '</h2>';
        echo '<p class="life">' . $life . '</p>';
        echo '<p>' . $bio . '</p>';
        echo '</div>';
        echo '</div>';
    }
}
?>
	

	</div><!-- .entry-content -->
コード例 #30
0
function content_blocks()
{
    if (have_rows('content_blocks')) {
        while (have_rows('content_blocks')) {
            the_row();
            if (get_row_layout() == 'full_width_text_block') {
                $sectionID = get_sub_field('section_id');
                $sectionClass = get_sub_field('section_class');
                $full_width_headline = get_sub_field('full_width_headline');
                $full_width_paragraph = get_sub_field('full_width_paragraph');
                echo '<section id="' . $sectionID . '" class="content-block ' . $sectionClass . '"><div class="wrap">';
                echo '<h2>' . $full_width_headline . '</h2>';
                echo '<div>' . $full_width_paragraph . '</div>';
                echo '</div></section>';
            }
            if (get_row_layout() == 'cta_block') {
                $sectionID = get_sub_field('section_id');
                $sectionClass = get_sub_field('section_class');
                $headline = get_sub_field('headline');
                $paragraph = get_sub_field('full_width_paragraph');
                echo '<section id="' . $sectionID . '" class="' . $sectionClass . '"><div class="wrap">';
                echo '<h2>' . $headline . '</h2>';
                echo '<div>' . $paragraph . '</div>';
                echo '</div></section>';
            }
            if (get_row_layout() == 'team_block') {
                $sectionID = get_sub_field('section_id');
                $sectionClass = get_sub_field('section_class');
                $team_block_intro = get_sub_field('team_block_intro');
                echo '<section id="' . $sectionID . '" class="content-block ' . $sectionClass . '"><div class="flexible-widgets"><div class="wrap">';
                echo '<header>' . $team_block_intro . '</header>';
                if (have_rows('team_member')) {
                    while (have_rows('team_member')) {
                        the_row();
                        // $author_id = get_the_author_meta('ID');
                        $team_member_image = get_sub_field('team_member_image');
                        $team_member_name = get_sub_field('team_member_name');
                        $team_member_title = get_sub_field('team_member_title');
                        $team_member_story = get_sub_field('team_member_story');
                        $team_member_social = get_sub_field('team_member_social');
                        $author_id = get_sub_field('author_id');
                        $author_link = $author_id[ID];
                        $profile_link = get_author_posts_url($author_link);
                        $team_member_phone = get_sub_field('phone');
                        $team_member_email = get_sub_field('email');
                        echo '<article class="team-member">';
                        echo '<a href="' . $profile_link . '">';
                        echo '<img src="' . $team_member_image . '"/></a>';
                        echo '<div class="team-header"><h3>' . $team_member_name . '</h3>';
                        echo '<h4>' . $team_member_title . '</h4></div>';
                        echo '<div id="social">' . $team_member_social . '</div>';
                        echo '<div id="contact"><span>' . $team_member_email . '</span><span>' . $team_member_phone . '</span></div>';
                        echo '<div class="team-content"><p>' . $team_member_story . '</p><p>' . $author_link[ID] . '</p></div>';
                        echo '</article>';
                    }
                }
                echo '</div></div></section>';
            }
            if (get_row_layout() == 'full_width_image') {
                $sectionID = get_sub_field('section_id');
                $sectionClass = get_sub_field('section_class');
                $image = get_sub_field('image_full_width');
                echo '<section id="' . $sectionID . '" class="content-block ' . $sectionClass . ' secondary-full-width-image image-section" style="background: url(';
                echo $image;
                echo '); background-repeat: no-repeat; background-position: center center; background-size: cover; background-color: #FFFFFF;"><div class="wrap">';
                echo '</div></section>';
            }
            if (get_row_layout() == 'two_column_text_block') {
                $sectionID = get_sub_field('section_id');
                $sectionClass = get_sub_field('section_class');
                $headline = get_sub_field('full_width_headline');
                $first_column = get_sub_field('first_column');
                $second_column = get_sub_field('second_column_again');
                echo '<section id="' . $sectionID . '" class="content-block ' . $sectionClass . ' flexible-widgets"><div class="wrap">';
                echo '<h2>' . $headline . '</h2>';
                echo '<div class="one-half first">' . $first_column . '</div>';
                echo '<div class="one-half">' . $second_column . '</div>';
                echo '</div></section>';
            }
            if (get_row_layout() == 'three_column_text_block') {
                $sectionID = get_sub_field('section_id');
                $sectionClass = get_sub_field('section_class');
                $headline = get_sub_field('full_width_headline');
                $first_column = get_sub_field('first_column');
                $second_column = get_sub_field('second_column_again');
                $third_column = get_sub_field('third_column_again');
                echo '<section id="' . $sectionID . '" class="content-block ' . $sectionClass . '"><div class="wrap">';
                echo '<h2>' . $headline . '</h2>';
                echo '<div class="one-third first">' . $first_column . '</div>';
                echo '<div class="one-third">' . $second_column . '</div>';
                echo '<div class="one-third">' . $third_column . '</div>';
                echo '</div></section>';
            }
            if (get_row_layout() == 'content_block') {
                $sectionId = get_sub_field('section_id');
                $sectionClass = get_sub_field('section_class');
                if (have_rows('content_text_block')) {
                    $count = 0;
                    while (have_rows('content_text_block')) {
                        the_row();
                        $count = $count + 1;
                        $class = '';
                        if ($count == 1) {
                            $class .= ' widget-full';
                        } elseif ($count % 3 == 1) {
                            $class .= ' widget-thirds';
                        } elseif ($count % 4 == 1) {
                            $class .= ' widget-fourths';
                        } elseif ($count % 2 == 0) {
                            $class .= ' widget-halves uneven';
                        } else {
                            $class .= ' widget-halves';
                        }
                        // return $class;
                    }
                    echo '<section id="' . $sectionId . '" class="content-block ' . $sectionClass . '"><div class="flexible-widgets widget-area' . $class . '"><div class="wrap">';
                    while (have_rows('content_text_block')) {
                        the_row();
                        echo '<article class="widget ">';
                        the_sub_field('text_block');
                        echo '</article>';
                    }
                    echo '</div></div></section>';
                }
            }
            if (get_row_layout() == 'google_map') {
                $sectionID = get_sub_field('section_id');
                $sectionClass = get_sub_field('section_class');
                $map_text = get_sub_field('map_text');
                $location = get_sub_field('map');
                //echo '<section class="secondary-full-width-map">';
                echo '<section id="' . $sectionID . '" class="content-block ' . $sectionClass . '">';
                echo '<article class="secondary-full-width-map widget">';
                echo '<h3>' . $map_text . '</h3>';
                echo '<p>' . $location['address'] . '</p>';
                echo '<div id="map" style="width: 100%; height: 350px;"></div>
                    <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>';
                echo '<script type="text/javascript">
                  //<![CDATA[
                    function load() {
                    var lat =' . $location['lat'] . ';
                    var lng =' . $location['lng'] . ';
                // coordinates to latLng
                    var latlng = new google.maps.LatLng(lat, lng);
                // map Options
                    var myOptions = {
                    scrollwheel: false,
                    zoom: 14,
                    center: latlng,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                   };
                //draw a map
                    var map = new google.maps.Map(document.getElementById("map"), myOptions);
                    var marker = new google.maps.Marker({
                    position: map.getCenter(),
                    map: map
                   });
                }
                // call the function
                   load();
                //]]>
                </script>';
                //echo '</section>';
                echo '</article>';
                echo '</section>';
            }
        }
    }
}