wp query custom post type filter by acf field value

Solutions on MaxInterview for wp query custom post type filter by acf field value by the best coders in the world

showing results for - "wp query custom post type filter by acf field value"
Frida
23 Jul 2016
1<?php 
2
3$posts = get_posts(array(
4	'posts_per_page'	=> -1,
5	'post_type'			=> 'post'
6));
7
8if( $posts ): ?>
9	
10	<ul>
11		
12	<?php foreach( $posts as $post ): 
13		
14		setup_postdata( $post );
15		
16		?>
17		<li>
18			<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
19		</li>
20	
21	<?php endforeach; ?>
22	
23	</ul>
24	
25	<?php wp_reset_postdata(); ?>
26
27<?php endif; ?>