Support

Account

Home Forums ACF PRO Choose sidebar for page with checkbox field Reply To: Choose sidebar for page with checkbox field

  • The Answer:

    I have put the Code inside the page loop and i have to change the code a little bit because the field type is checkbox…

    <?php
    
    	$sidebars = get_field('sidebar');
    
    	if( $sidebars ): 
    		?>
    		
    			<?php foreach( $sidebars as $sidebar ): ?>
    				
    					<?php dynamic_sidebar($sidebar); ?>
    				
    			<?php endforeach; ?>
    	<?php endif; ?>