Custom Fields
Add structured data to any content type — text, numbers, selects, dates, media, and more.
Custom fields let you attach structured data to content types beyond the built-in title, body, and excerpt. You define field groups, add fields to them, and attach groups to content types.
How it works
The system has two layers:
- Field groups — named collections of fields (e.g. "Product Details", "Event Info"). A group can be attached to multiple content types.
- Fields — individual inputs inside a group. Each field has a type, a label, and optional settings.
Creating a field group
- Go to Custom Fields in the admin sidebar.
- Click New Field Group and give it a key (machine name, e.g.
product-details) and a label. - Inside the group, click Add Field and configure:
- Key — machine identifier (e.g.
price). - Label — shown in the editor.
- Type — see the field types table below.
- Section — optional visual grouping header shown in the editor and on the frontend.
- Translatable — if on, the field has a separate value per language.
- Required — if on, the field must be filled to save.
- Key — machine identifier (e.g.
Field types
| Type | What it stores |
|---|---|
| Text | Single-line string |
| Textarea | Multi-line string |
| Rich Text | HTML via the block editor |
| Number | Numeric value |
| Boolean | Yes / No checkbox |
| Date | ISO date string |
| Select | Single choice from a list of options |
| Multi-select | Multiple choices, stored as JSON array |
| Media | A media library item (image, file) |
| URL | A validated URL string |
Attaching a group to a content type
- Go to Configuration → Content Types and edit the content type.
- Open the Custom Fields tab.
- Drag and drop field groups from the available list into the attached list. Order controls display position.
- Save.
Editing custom fields on a content item
When a content type has attached field groups, the edit screen gains a Custom Fields tab next to General. Click it to see all attached groups with their fields organised by section. Fill in the values and save normally.
Translatable fields show one input per language (using the same language tab switcher as the title and body).
Displaying custom fields on the frontend
The default theme renders custom field values automatically on post pages — below the content blocks, above the comments section. Fields are grouped by their section heading. Fields with no value are hidden.
If you're building a custom theme or plugin, custom field values are available via the $fieldValues array passed to theme::post. The key format is {field_id}:{language_id} for translatable fields and {field_id}:_ for non-translatable ones.