Home › Forums › Feedback › ACF makes a good combo with Live-Edit › Reply To: ACF makes a good combo with Live-Edit
@daron, how would I implement this in my template?
Here’s my template code:
// check if the repeater field has rows of data
if( have_rows('sections') ):
while ( have_rows('sections') ) : the_row();
//OPEN SECTION
echo '<section id="' . get_sub_field('section_id') . '">';
//OPEN CONTAINER
echo '<div class="container">';
if( have_rows('rows') ):
while ( have_rows('rows') ) : the_row();
//OPEN ROW
echo '<div class="row" id="' . get_sub_field("row_id") . '">';
if( have_rows('columns') ):
// loop through the rows of data
while ( have_rows('columns') ) : the_row();
//OPEN COLUMN
echo '<div ';
if(function_exists("live_edit")){
live_edit('column_content');
};
echo ' class="'. get_sub_field("column_classes") .'" id="'. get_sub_field("column_id") .'">';
echo get_sub_field("column_content");
// Close Column
echo '</div>';
endwhile;
endif;
// Close Row
endwhile;
echo '</div>';
//CLose Container
endif;
echo '</div>';
echo '</section>';
endwhile;
endif;
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.