> 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/functions/register_acpt_post_type.md).

# register\_acpt\_post\_type

Register a new custom post type

Register a new custom post type.

### Usage

```php
register_acpt_post_type([ 
    'post_name'      => 'cpt', 
    'singular_label' => 'New CPT', 
    'plural_label'   => 'New CPTs', 
    'icon'           => 'admin-appearance',
    'supports'       => [ 
        'title',
        'editor', 
        'comments', 
        'revisions', 
        'trackbacks', 
        'author', 
        'excerpt',
    ], 
    'labels'      => [], 
    'settings'    => [], 
    'permissions' => [],
]);
```

### Parameters

| Parameter        | Type   | Required | Description                                                                                                                                                                                                 |
| ---------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `post_name`      | string | Required | The post type slug                                                                                                                                                                                          |
| `singular_label` | string | Required | The singular display label. Also accepted as `singularLabel`                                                                                                                                                |
| `plural_label`   | string | Required | The plural display label. Also accepted as `pluralLabel`                                                                                                                                                    |
| `icon`           | string | Optional | The admin menu icon (see [Dashicons](https://developer.wordpress.org/resource/dashicons/)). Defaults to `admin-post`                                                                                        |
| `supports`       | array  | Optional | WordPress post type features to enable — see [official documentation](https://developer.wordpress.org/reference/functions/register_post_type/). Defaults to `['title', 'editor']`                           |
| `labels`         | array  | Optional | Override default generated labels — see [official documentation](https://developer.wordpress.org/reference/functions/register_post_type/). Auto-generated from `singular_label`/`plural_label` when omitted |
| `settings`       | array  | Optional | Additional post type arguments — see [official documentation](https://developer.wordpress.org/reference/functions/register_post_type/). Auto-generated with sensible defaults when omitted                  |
| `permissions`    | array  | Optional | Role-based capability overrides for this post type                                                                                                                                                          |

{% hint style="info" %}
When `icon`/`supports`/`labels`/`settings` are omitted entirely, sensible defaults are filled in (matching what the admin UI's creation wizard pre-fills). Explicitly passing an empty array (`[]`) is respected as-is and does **not** trigger the defaults.
{% endhint %}

### Return

| Type   | Description                                                             |
| ------ | ----------------------------------------------------------------------- |
| `bool` | `true` if the post type was registered successfully, `false` on failure |
