> For the complete documentation index, see [llms.txt](https://knowledgebase.ajaxsearchpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.ajaxsearchpro.com/hooks/filters/query-and-output/asp_pre_get_front_filters.md).

# asp\_pre\_get\_front\_filters

For more usage examples, please check the [Frontend Filters API](/frontend-filters/frontend-filters-api.md) section.

```php
apply_filters('asp_pre_get_front_filters', $filters, $type);
```

### Parameters

* **$filters** (aspFilter\[]) - Array of filters
* **$type** - Filter type

### Usage

```php
add_filter('asp_pre_get_front_filters', 'asp_change_a_filter', 10, 2);
function asp_change_a_filter($filters, $type) {
  if ($type == 'custom_field') {
    foreach ($filters as $k => &$filter) {
		if ($filter->data['field'] == 'field_name') {
			$filter->attr('Old Label', 'label', 'New Label');
			break;
		}
    }
  }
  
  return $filters;
}
```
