Last active
          March 26, 2019 12:01 
        
      - 
      
 - 
        
Save RiodeJaneiroo/443c285ff87378271ea101e955534dbf to your computer and use it in GitHub Desktop.  
    [flexible loop ACF] #acf #wordpress #loop
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function get_flexible_loop($page_id = null){ | |
| if(have_rows('flexible', $page_id)) { | |
| while (have_rows('flexible', $page_id)) { | |
| the_row(); | |
| $section_name = str_replace('_', '-', get_row_layout()); | |
| get_template_part("/parts/flexible/{$section_name}"); | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment