Field settings: display and advanced
3 min read
The Display tab of a field's Advanced options controls how a value is printed on your site and a few related conveniences. (The edit-screen Width is on the General tab, see Field settings: general, validation and SQL column.)
Output settings
These settings apply when you print a field with wpmcf_the_field() or the [wpmcf_field] shortcode. They do not change wpmcf_get_field(), which always returns the raw value.
Setting | Default | Effect |
|---|---|---|
Wrapper CSS class ( | empty | Classes added to the |
Wrapper HTML ID ( | empty | The |
Prefix (added before value) | empty | Text printed before the value, for example |
Suffix (added after value) | empty | Text printed after the value, for example |
Below the inputs, an HTML preview shows the resulting markup with the word value in place of the real value.
Example: a Text field with class my class, id my-id, prefix >> and suffix << prints:
<span id="my-id" class="wpmcf-field-value my class">>>Toolongv<<</span>Prefix and suffix are escaped, and surrounding spaces are trimmed when the setting is saved. Use CSS (for example margin-left on the wrapper class) if you need a gap.
Turn the wrapper off for a single call with wrap:
wpmcf_the_field( 'product_details', 'price', null, [ 'wrap' => false ] ); // no span, no prefix/suffix[wpmcf_field group="product_details" field="price" wrap="false"]See Template functions for every argument.
Show in the admin list
Show in the admin list adds a column with this field's value to the list screen:
List screen | Which groups feed it |
|---|---|
Posts, pages, custom post types | Active groups with a rule Post type is equal to {type} (the "is not equal to" operator does not count). |
Terms ( | Active groups with a rule Taxonomy is equal to {taxonomy}. |
Users | Active groups with any User role or User form rule. |
Behavior:
- The column header is the field's label. Long text is trimmed to 12 words.
- The column is sortable (click the header) unless the field is stored as JSON (checkbox lists, relationships, groups, repeaters, ...).
- Password fields never get a column.
- The toggle is not offered for sub-fields inside a Group or Repeater.
Pro adds filters above the list, quick edit and bulk edit for these columns, and CSV export. See Admin columns.
In translations (Business, WPML or Polylang)
When WPML or Polylang is active and the site has a plan that includes multilingual support, a select named In translations appears. It decides what a translation of a post gets for this field:
Option | Meaning |
|---|---|
Translate (start from the original) (default) | The translation has its own value, prefilled from the original when it is created. |
Copy (always the original value) | The original's value is kept in sync with the translation. |
Ignore (start empty) | The translation starts empty. |
Without WPML or Polylang, or on a plan without multilingual support, the select is not shown and every field behaves like Translate. See Integrations for the setup.
Troubleshooting
Problem | Fix |
|---|---|
The wrapper, prefix or suffix do not appear | You used |
Prefix and suffix are greyed out | A SQL column function is set, or the field type is stored as JSON. |
The admin column does not show | The group has no rule for that list (for example Post type), or the group is inactive. Check Location rules. |
The column is not sortable | The field is stored as JSON. |
Still stuck? Contact support