ACF True False

* Single Value * <?php if( get_field('enable_scroll') ): ?> // do something <?php endif; ?> * Multiple Values * <?php if( get_field('enable_sidebar') ): ?> <?php // do something ?> <?php endif; ?> <?php if ( 'yes' == get_field('field_name') ): ?> If true do this <?php else: ?> If false do this <?php endif; ?> <?php if ( !get_field('upper_cta' ) ){ locate_template( 'partials/flat-content-teaser.php', true, false ); } ?> <?php if ( !get_field('upper_cta' ) ){ locate_template( 'partials/flat-content-teaser.php', true, false ); } if ( !get_field('lower_cta' ) ){ locate_template( 'partials/content-global-ctas.php', true, false ); } ?>
ACF True False

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.