> For the complete documentation index, see [llms.txt](https://docs.acpt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acpt.io/developers/actions/add_cpt_to_acpt_list.md).

# add\_cpt\_to\_acpt\_list

Filters the list of custom post types before they are returned

**Type:** Filter

Filters the list of custom post types before they are returned by the internal fetch query.

### Parameters

| Parameter          | Type    | Description                |
| ------------------ | ------- | -------------------------- |
| `$customPostTypes` | `array` | The custom post types list |

**Return:** `array` — the (optionally modified) list.

### Usage

```php
add_filter("add_cpt_to_acpt_list", function(array $customPostTypes){
    // modify or extend the list
    return $customPostTypes;
});
```
