Filter Pages by multiple fields

here you go (e.g. filtering stores or whatever):

// $selections is an array with the values of the selected checkboxes, don't know how you retrieve them in your setup
// $selections = array('locationA', 'locationB', 'location');
$stores = $pages->filter(function($child) {
  // only $child that return true in here will be part of $stores
  return in_array($child->locations(), $selections);
});
1 Like