Support

Account

Home Forums General Issues Filtering by checkboxes – again… Reply To: Filtering by checkboxes – again…

  • checkbox fields are stored as serialized arrays in the database. Try putting ” around the search value. This is shown, but not very obvious under QUERY POSTS on this page Query http://www.advancedcustomfields.com/resources/checkbox/

    
    $args = array(
    	'numberposts'	=> -1,
    	'post_type'	=> 'restaurant',
    	'meta_query'	=> array(
    		array(
    			'key'		=> 'restaurant_assets',
    			'value'		=> '"'.$restaurant_assets.'"',
    			'compare'	=> 'LIKE'
    		)
    	)
    );