Support

Account

Home Forums General Issues problems using ACF field to display specific posts Reply To: problems using ACF field to display specific posts

  • Envirodefence,

    It looks like you need to do a meta_query in your get_posts() function. You can find the docs here: https://www.advancedcustomfields.com/resources/query-posts-custom-fields/. Look under the Custom Fields advanced section for an example on how to query a checkbox. Essentially, you will add a query field like so:

    'meta_query'	=> array(
    			'key'	  	=> 'featured_type',
    			'value'	  	=> 'about',
    			'compare' 	=> '=',
    		),
    	),