<!--THE CONDITIONAL SIDEBAR CONTENTS--> <?php if(get_field('alternate_sidebar_content')) {?> <?php the_field('alternate_sidebar_content'); ?> <?php } ?><!-- ends the first condition --> <?php if(!get_field('alternate_sidebar_content')) {?> <?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?> <?php endif; // end sidebar widget area ?> <?php }?> <!-- ends the second outer condition -->