- check the groupkey
' . $groupkey . '';
- $groupkey_fields = acf_get_fields($groupkey);
- foreach( $groupkey_fields as $field_key ) {
- if( $field_key['type'] == 'checkbox' ){
- //echo '
' . ($field_key['key']) . '';
- //echo '
' . ($field_key['label']) . '';
- //echo '
' . ($field_key['name']) . '';
- // https://wordpress.stackexchange.com/a/102915
- //$field_key = "field_XXXXXX";// the acf field key unic numbers
- $field_key = $field_key['key'];
- $fields = get_field_object($field_key);
-
- if( $fields )
- {
- // check for values in url
- foreach( $GLOBALS['my_query_filters'] as $key => $fieldname ):
-
- // set value if available
- if( isset($_GET[ $fieldname ]) ) {
-
- $filteredvalues['value'] = explode(',', $_GET[ $fieldname ]);
-
- };
-
- // construct the checkboxes
- if( $fieldname == $fields['name']) {
- echo '
';
- };
- // end of construct checkboxes
-
- endforeach;
- // end check for values in url
- }
- };//end if type checkbox
- };//end foreach groupkey field
- };//end if groupkey
- ?>
-
-
-
-
-