Show only content specified from ACF

<?php $args = array('post_type' => "testimonials", 'posts_per_page' => -1, 'orderby'=>"rand", 'order'=>"asc"); $postType = new WP_Query( $args ); if( $postType->have_posts() ) { while( $postType->have_posts() ) { $postType->the_post(); $selectPeople = get_field('select_layout'); ?> <?php if ($selectPeople == "single_person"):?> <li> <?php the_field('employee_title'); ?> </li> <?php endif; ?> <?php } } wp_reset_query(); ?>

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.