Support

Account

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;