---
url: /hooks/filters/wpce-relation-list-terms.md
description: Filter the terms returned by WPCE relation and term input searches.
---

# `wpce_relation_list_terms`&#x20;

Filters the terms fetched on the `relationslist` endpoint.

## Parameters

1. `object[] $terms`

   The available terms, in the format returned by the ../../documentation/input-types/post input type.

## Example

```php
// Only keep terms with ID different from 1
add_filter('wpce_relation_list_terms', function (array $terms) {
  return array_filter($terms, fn ($term) => $term->id !== 1);
});
```
