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

# get\_acpt\_meta\_field\_objects

Get an array of meta field object representations

Get an array of meta field object representations for a given WordPress context.

### Usage

```php
$fields = get_acpt_meta_field_objects('customPostType', false, 'page');
```

### Parameters

| Parameter      | Type    | Required | Description                                                                                 |
| -------------- | ------- | -------- | ------------------------------------------------------------------------------------------- |
| `belongsTo`    | string  | Required | The context type. Allowed values: `customPostType`, `optionPage`, `taxonomy`, `user`        |
| `clonedFields` | boolean | Optional | Whether to include cloned fields in the results. Defaults to `false`                        |
| `find`         | string  | Optional | The target slug (e.g. the post type slug `page`). Can be omitted when `belongsTo` is `user` |

{% hint style="warning" %}
The parameters are positional in this order: `belongsTo`, `clonedFields`, `find` — note that `clonedFields` (a boolean) comes **before** `find`, not after. Passing a slug as the second argument (e.g. `get_acpt_meta_field_objects('customPostType', 'page')`) will not filter by `page` — it will be coerced into `clonedFields` instead and `find` will stay unset.
{% endhint %}

### Return

| Type    | Description                                                                     |
| ------- | ------------------------------------------------------------------------------- |
| `array` | An array of `\stdClass` field objects. Returns an empty array if none are found |
