
I have the following code and I want to loop out into a two column grid. I am using the Genesis framework and I have seen plenty of tuts on how to do it with a custom post but none with a ACF Repeater Fields. If there someone that is willing to give me a hand?
Thanks greatly,
Jeffrey
<?php
/*
* Template Name: Our Work Overview
*/
// Remove standard post content output
//remove_action( 'genesis_post_content', 'genesis_do_post_content' );
//remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
// Adding our custom content output
add_action( 'genesis_entry_content', 'genesis_our_work_overview', 10, 2 );
add_action( 'genesis_post_content', 'genesis_our_work_overview', 10, 2 );
// The Custom Content output function
function genesis_our_work_overview() { ?>
<!-- Our Work listing ACF -->
<?php if (get_field('our_work_overview')): ?>
<div class="our-work-container">
<?php while(has_sub_field("our_work_overview")): ?>
<div class="our-work-section">
<div class="our-work-image"> <img src="<?php $image = get_sub_field('image_our_work_overview'); echo $image['sizes']['custom-thumb-2']; ?>" /></div>
<div class="our-work-inner-section">
<div class="our-work-section-title"><h2><?php the_sub_field('title_our_work_overview'); ?></h2></div>
<div class="our-work-excerpt"><h4><?php the_sub_field('excerpt_our_work_overview'); ?></h4></div>
<div class="our-work-section-link">
<?php $theLink = get_sub_field('section_link_our_work_overview'); ?>
<a href="<?php echo ( $theLink ) ?>">
<?php the_sub_field('section_link_our_work_overview'); ?>
</a>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<?php endif; ?>
<?php
}
genesis();