Client sites keep extra details on each entry: a job title on a team member, a price on a course, an ISBN on a book. These live in custom fields, and Delta does not know they exist until you tell it.
A field map is that introduction. You point Delta at one custom field and give it a short name. The agent can then place that value anywhere in your design, and every entry fills in its own.
Set one up
Ask the agent for it in plain words:
“Add a field map so the course_level custom field shows up as level.”
That is the whole setup. From then on, {{level}} in a template prints the course level of whichever course the visitor is looking at.
When the agent builds a content type with Advanced Custom Fields, Secure Custom Fields, Meta Box, Pods or Custom Post Type UI, Delta writes the maps for you. You do not ask for them.
What you can map
| You have | Delta gives you |
|---|---|
| A text field | The text |
| A field with several lines of plain text | The text, with its line breaks |
| A field with formatted content | The formatted content |
| A URL field | The address |
| An image field | The image, ready to place |
| A date field | The date, in the site’s date format |
| A true/false field | Yes or no, which the design can use to show or hide a part |
| A link field | The address, the link text and how it opens |
| A file field | The file address, its name and its size |
| A map or location field | The address and the coordinates |
| A user field | The person’s name, avatar and author page |
| A group of fields | Each field in the group, by its own name |
| A gallery | A list of images you can loop over |
| A checkbox or multi-select field | A list of choices you can loop over |
| A repeater or flexible content field | A list of rows you can loop over |
| A category or tag group | A list you can loop over |
| A field holding other entries | A list you can loop over |
The first twelve print a value. The last five give you a list, so the agent repeats a piece of markup once per item, with the same loops you use elsewhere in Delta.
Fields from Advanced Custom Fields, Secure Custom Fields, Meta Box, Pods and JetEngine are read through the plugin. The value on the page is the value the plugin shows in its own screens.
An example
A client sells courses. Each course has a level, a badge image, a set of topics and a list of lessons.
Ask for the maps:
“Add field maps for courses: level from the course level field, badge from the badge image, topics from the course topics, and lessons from the lessons repeater.”
One template for all courses can now show all of them: the title, the level, the badge, a list of topic links and one row per lesson. Add a course, fill in its fields, and the page is complete. You do not touch the template again.
Show a part only when a field has a value
If a field is empty on one entry, that spot is blank. The page still works. To hide a heading or a box with the empty field, the agent wraps that part in a has block:
{{#has:lessons}}
<h2>Lessons</h2>
<ol>{{#lessons}}<li>{{lesson_title}}</li>{{/lessons}}</ol>
{{/has}}
On a course with no lessons, the heading and the list do not show.
Values for the whole site
Some values belong to the site, not to one entry: a phone number, opening hours, a social link. Keep them on an options page of Advanced Custom Fields, a settings page of Meta Box, or a Pods settings pod, and ask the agent to map them. These maps print everywhere, also in the header and the footer.
Where to see them
Go to Delta → Site in wp-admin and open the Field Maps tab for the full list. You can add and edit maps there by hand, and filter them by post type.
Maps you create yourself are marked manual. Maps Delta writes for a content type are marked synced. When you save a post type, taxonomy or field group in Advanced Custom Fields, Secure Custom Fields, Custom Post Type UI or JetEngine, the synced maps update on their own. A map whose field or plugin is gone says so when the agent reads it.
After an update from 0.2
Maps synced before 0.3.0 stay as they are, so your pages do not change. To move them to the new types, ask the agent to upgrade the field maps. Check your templates first: an upgraded true/false field prints true instead of 1, and an upgraded multi-select becomes a list.
A field with several lines of text now prints its line breaks. To get the old output with no breaks, use {{name_raw}}.
For developers
A map binds a placeholder name to a source: meta, taxonomy, option or relationship (MB Relationships, with config.relationship and config.direction). config.provider names the plugin that holds the field: acf, scf, meta-box, pods or jetengine. An html value goes through the allow-list for every viewer.
Value types: text, textarea, html, url, image, date, boolean, link, file, location, user and group. Loop types: terms, posts, images, list and rows (repeater, or flexible content with config.layouts).
| Type | Extra placeholders |
|---|---|
textarea | {{name_raw}} (no <br>) |
image | {{name_url}}; size from config.size, default large |
date | {{name_iso}} |
boolean | {{name_class}} prints is-name or nothing |
link | {{name_title}}, {{name_target}} |
file | {{name_title}}, {{name_size}}, {{name_mime}}, {{name_id}} |
location | {{name_lat}}, {{name_lng}}, {{name_zoom}} |
user | {{name_url}}, {{name_avatar}}, {{name_id}} |
group | One placeholder per sub-field: {{name_sub}} |
Loops are {{#name}}…{{/name}}. Inside images: {{image}}, {{image_url}}, {{image_alt}}, {{image_caption}}, {{image_width}}, {{image_height}} (attributes size, count). Inside list: {{value}}, {{label}}, {{key}}. Inside rows: one placeholder per sub-field and {{layout}} (attributes layout, count). Loops nest up to three levels.
{{#sections layout=hero}}<h2>{{heading}}</h2>{{/sections}}
{{#has:badge not=1}}<p>No badge yet</p>{{/has}}
{{#has:name}} has no else branch; use not=1 for the empty case. config.provider is acf, scf, meta-box, pods or auto, and source: option needs one.
Names use lowercase letters, digits and underscores, and cannot reuse a name Delta already owns, such as title or permalink. Sync maps a field with a reserved name as {post_type}_{name}. Maps are site-wide unless you scope them to post types. The abilities are delta/list-field-maps, delta/get-field-map, delta/upsert-field-map, delta/delete-field-map and delta/sync-content-type-field-maps (pass upgrade: true to move maps synced before 0.3.0).