Custom Fields
Custom Fields is the WP PowerSuite Pro field-group builder for post meta (posts, pages, and custom post types) and taxonomy term meta. Editors fill in structured data on familiar WordPress screens; themes, shortcodes, blocks, and page builders read those values on the front end.
Values are stored as native WordPress meta. The field key is the meta key. Field group definitions live in a single option (wp_powersuite_cf_groups, schema version 3, not autoloaded).
Requires WP PowerSuite Pro installed beside the free plugin, with an active license. Without a valid license, the admin page shows a notice and the builder does not run.
What you can build
Section titled “What you can build”| Capability | Detail |
|---|---|
| Field groups | Unlimited groups; enable/disable, duplicate, delete |
| Field types | 30+ across Basic, Choice, Layout, Content, Relational |
| Nested structures | Group, Repeater, Flexible Content, Clone |
| Location rules | Posts/CPTs or taxonomy terms; AND / OR matching |
| Conditional logic | Per-field show/hide based on other field values |
| Editor placement | Above editor, below editor, or sidebar; priority & style |
| Block editor | Metaboxes + document sidebar for simple fields |
| Admin list columns | Optional columns on post and taxonomy list tables |
| Front-end display | Shortcode, content tags, Gutenberg block, PHP helpers |
| Page builders | Elementor, Bricks, Divi, Beaver Themer dynamic data |
| REST API | Optional per-group exposure (capability-aware; passwords never leak) |
| Portability | JSON import / export (definitions only) |
| CPT Builder bridge | Create or jump to groups from a CPT or taxonomy |
Admin path: WP PowerSuite → Custom Fields
(admin.php?page=powersuite-custom-fields)
Quick start (agency / production)
Section titled “Quick start (agency / production)”- Install free WP PowerSuite, then install WP PowerSuite Pro beside it and activate your license.
- Enable Custom Fields under WP PowerSuite → Modules → Content.
- Open WP PowerSuite → Custom Fields → Add Field Group.
- Set a Title and Group key (example:
book_details). - Add fields (example: Text
subtitle, Imagecover, Relationshiprelated_books). - Under Where It Appears, choose Posts, pages, or CPTs, position Below the editor.
- Add a location rule: Post Type is equal to your CPT (or
post/page). - Toggle Enabled → Save.
- Edit a matching post, fill the fields, update.
- Display with shortcode, block, tag, builder, or PHP (see Display on the front end).
After the first save, open the Usage accordion on the group for copy-paste shortcode, dynamic tag, and PHP snippets for every field.
Admin screens
Section titled “Admin screens”Field group list
Section titled “Field group list”- Search / filter groups
- Add Field Group
- Row actions: edit, duplicate, export, delete
- Export All / Import
- Status: enabled vs disabled — toggle from the list without leaving the page
Group editor layout
Section titled “Group editor layout”Left — Fields
- Empty state until you add fields
- Add Field → Choose Field Type
- Each row: drag handle, expand/collapse, label, type badge, duplicate, delete
- Expanded field tabs: Basics, Display, Logic
Right sidebar
- Enabled toggle
- Save / Create Field Group
- Group Setup: Title, Group key
- Where It Appears: Editing screen, Field position, Panel style, Group order, Show in REST API
- Location Rules
- Usage (after first save) — keys + copyable examples
Limits you should plan around
Section titled “Limits you should plan around”| Limit | Value |
|---|---|
| Group / field key length | Max 64 characters |
| Import file size | Max 1 MB |
| Import JSON depth | Max 32 |
| Import as disabled | Checked by default (recommended) |
| Password fields | Never rendered publicly (shortcode, tag, block, builders, list columns, REST, HTML) |
Field keys are generated from the label when you add a field and are locked after the group is saved. Plan naming carefully for templates and migrations.
Field types reference
Section titled “Field types reference”| Type | Stores | Common settings |
|---|---|---|
| Text | String | Placeholder, default, maxlength, prepend/append, required |
| Text Area | String | Rows, new lines (autop / br / none), placeholder, default, maxlength |
| Number | Numeric | Min / max / step, default, prepend/append |
| Range | Numeric | Min / max / step, live value display |
| String | Placeholder, default, validation | |
| Phone | String | Placeholder, maxlength |
| URL | String | Placeholder, default |
| Password | Hashed secret | Blank save keeps existing hash; never exposed on front end |
| Date | Date string | Display format, return format, first day of week, default to today |
| Time | Time string | Display / return formats |
| Date & Time | Datetime string | Display / return formats, first day, default to now |
| Color | Color string or array | Return format string / array |
Choice
Section titled “Choice”| Type | Notes |
|---|---|
| True / False | Toggle UI; Yes/No style options |
| Select | Single select; allow null; return value / label / both |
| Radio Buttons | Horizontal or vertical layout; allow null; return formats |
| Checkboxes | Multi-select; optional “toggle all”; return formats |
| Button Group | Compact choice UI |
| Nav Menu | Pick a menu; return menu ID, object, or rendered HTML |
Choice options typically use value|Label lines. Changing choices after content exists keeps or surfaces old values safely — review content after large option renames.
Layout (structure & editor UI)
Section titled “Layout (structure & editor UI)”| Type | Saves meta? | Purpose |
|---|---|---|
| Message | No | Instructions / HTML for editors |
| Separator | No | Visual divider |
| Output | No | Read-only computed/display output |
| Tab | No | Organize fields into tabs |
| Accordion | No | Collapsible sections |
| Group | Yes (sub-fields) | Bundle related sub-fields |
| Repeater | Yes | Repeatable rows |
| Flexible Content | Yes | Choose a layout per row |
| Clone | Yes | Reuse fields from another group |
Layout-only types (message, tab, accordion, separator, output) do not create meta keys.
Content
Section titled “Content”| Type | Notes |
|---|---|
| Icon Picker | Dashicons, media, or URL; string or array return |
| Google Map | Map defaults (center, zoom, etc.) |
| WYSIWYG Editor | TinyMCE options |
| oEmbed | Embed URL with optional dimensions |
| Link | URL + title + target; return array or URL |
| Image | Media library; MIME / size / dimensions; return array, URL, or ID |
| Gallery | Multiple images; min/max count; display mode |
| File | Attachment; MIME filters; return array, URL, or ID |
Relational
Section titled “Relational”| Type | Notes |
|---|---|
| Post Object | Single related post; filter by type/status; return object or ID |
| Relationship | Multi related posts; filters, elements, min/max count |
| Page Link | Link to posts/pages/archives |
| Taxonomy Term | Select / multi / radio / checkbox modes; optional create & sync terms |
| User | Filter by role; return array, object, or ID |
Bidirectional sync is supported for post_object, relationship, term, and user when configured — selecting a related object can update the reverse side.
Nested fields in depth
Section titled “Nested fields in depth”Use a Group when several fields belong together (for example Address: street, city, postal code) but you do not need multiple rows.
Repeater
Section titled “Repeater”Use a Repeater for variable-length lists (team members, FAQ items, specs).
Typical settings:
- Min / max rows
- Button label (“Add row”)
- Collapsed rows by default
- Optional pagination for large sets
- Nested layout (table / block style where available)
Editors can add, remove, and reorder rows. Empty repeaters should not leave junk meta.
Flexible Content
Section titled “Flexible Content”Use Flexible Content when each row can be a different layout (hero, quote, gallery, CTA). Define layouts in the builder; editors pick a layout per row.
Clone pulls field definitions from another group so you can reuse a shared set (for example SEO fields) without rebuilding them. Prefix options keep cloned keys distinct when needed.
Nested restrictions
Section titled “Nested restrictions”Sub-fields inside Group / Repeater / Flexible / Clone cannot be:
- Another group, repeater, flexible content, or clone
- Layout-only types: message, tab, accordion
Required sub-fields are enforced when visible. Prefer shallow nesting for editor usability and template clarity.
Location rules
Section titled “Location rules”Location rules decide where a group appears. Each group targets one screen type:
| Editing screen | Attaches to |
|---|---|
| Posts, pages, or CPTs | Post edit screens (classic + block) |
| Taxonomy terms | Add/Edit term screens |
Match mode
Section titled “Match mode”- Match all (AND) — every rule must pass
- Match any (OR) — one matching rule is enough
Parameters
Section titled “Parameters”| Parameter | Typical use |
|---|---|
post_type |
Posts vs Pages vs a CPT |
taxonomy |
Which taxonomy’s term screens |
page_template |
Only a specific page template |
post_status |
Draft vs publish, etc. |
post_format |
Themes that support formats |
post_term |
Post assigned a specific term |
post_taxonomy |
Post has any term in a taxonomy |
post_id |
One specific post |
post_parent |
Children of a parent page/CPT |
user_role |
Current user’s role |
user_id |
Current user ID |
term_id |
One specific term edit screen |
Operators
Section titled “Operators”is equal to, is not equal to, greater/less comparisons, contains / does not contain, is empty / is not empty.
Allowed operators depend on the parameter (IDs support numeric comparisons; taxonomies/terms use set-style operators).
Practical examples
Section titled “Practical examples”Books CPT only
- Screen: Posts, pages, or CPTs
- Rule: Post Type ==
book
Only the About page
- Post Type ==
pageAND Post ID ==42(Match all)
Editors only
- Post Type ==
postAND User Role containseditor
Genre terms
- Screen: Taxonomy terms
- Rule: Taxonomy ==
genre
Disabled groups never appear, even if rules would match.
Placement, style, width
Section titled “Placement, style, width”Field position (posts)
Section titled “Field position (posts)”| Position | Best for |
|---|---|
| Above the editor | Short fields editors should complete before writing. In the block editor, WordPress shows this as a high-priority meta box. |
| Below the editor | Detailed groups that need the full content column. |
| Editor sidebar | Compact publishing metadata and simple values. |
Priority & panel style
Section titled “Priority & panel style”- Priority: High / Default / Low — controls order relative to other boxes
- Panel style: Standard (classic metabox chrome) or Seamless (reduced chrome)
- Group order: Numeric ordering among PowerSuite groups
Field widths
Section titled “Field widths”Per-field widths: 100%, 75%, 50%, 25%. Combine on one row (for example 50+50, 25+75, 25×4). Side placement with very narrow widths can feel cramped — prefer full width in the sidebar.
Gutenberg behavior
Section titled “Gutenberg behavior”- Normal / above-editor groups render as metaboxes (including nested fields).
- Editor sidebar placement uses the document sidebar for simple fields only.
- Sidebar-capable examples: text, textarea, number, range, email, phone, url, date/time, color, toggle, select, radio, checkbox, message, image, file, link, gallery, oembed, single post_object / term / user.
- These stay in the metabox: password, wysiwyg, relationship, page_link, nested types, multiple relational fields.
Conditional logic
Section titled “Conditional logic”On each field’s Logic tab, show or hide the field based on other fields in the same group.
- Match all or any conditions
- Operators mirror location rules (equals, contains, empty, numeric comparisons, …)
- Updates live in the editor (no reload)
- Hidden required fields must not block save
- Record whether your workflow clears or keeps values when a field is hidden — plan templates accordingly
Example: show shipping_address only when needs_shipping (True/False) is Yes.
Taxonomy term fields
Section titled “Taxonomy term fields”- Set Editing screen to Taxonomy terms.
- Add a rule: Taxonomy == your taxonomy (optionally Term ID for one term).
- Save and open Add New / Edit for that taxonomy.
This includes taxonomies created in CPT Builder. Term fields load after those taxonomies register, and saved values stay on reload.
Values are stored in wp_termmeta, not wp_postmeta. Confirm with your database tools or Query Monitor if you are migrating from another fields plugin.
Term groups support nested fields and conditionals the same way as post groups (within nested restrictions).
Admin list columns
Section titled “Admin list columns”On a field’s Display tab, enable Show in admin list table.
- Column heading uses the field label
- Empty values show a dash-style placeholder
- Long text is truncated
- Images/files show a sensible label (not a raw ID dump)
- Galleries show a count; relationships show titles; toggles show Yes/No
- Password columns never expose the secret
- Columns appear on matching post type and taxonomy list tables when configured
Sorting is not a documented product feature.
CPT Builder bridge
Section titled “CPT Builder bridge”With CPT Builder enabled:
- Open a post type or taxonomy in CPT Builder.
- Use the Custom Fields tab → Create Field Group / Add.
- The Custom Fields editor opens with the location rule pre-filled (
for_post_type/for_taxonomy). - Save the group; the CPT list Field Groups column updates.
On the CPT/taxonomy Basic tab, you can also create a starter Details group once, then edit it under Custom Fields.
If Custom Fields is disabled, the CPT UI degrades safely (no broken flows).
Import / export
Section titled “Import / export”Definitions only — not the meta values on posts or terms.
| Action | Behavior |
|---|---|
| Export (row) | One group as JSON |
| Export All | Every group |
| Import | Upload JSON; re-validated against schema 3 |
JSON source identifier: wp-powersuite-custom-fields.
Import tips:
- Leave Import as disabled checked, review groups, then enable
- Duplicate keys: skip (overwrite off) or replace (overwrite on)
- Invalid / empty / oversized / over-deep JSON returns a clear error
- Unknown extra properties are ignored safely
- Nested fields, conditionals, and location rules survive a clean round-trip
Use export/import to move content models between staging and production.
Display on the front end
Section titled “Display on the front end”Shortcode
Section titled “Shortcode”Both tags are equivalent:
[wpps_cf group="book_details" field="subtitle"][wp_powersuite_cf group="book_details" field="subtitle" post_id="123" format="display" default=""][wpps_cf meta="subtitle" post_id="123"]| Attribute | Purpose |
|---|---|
group |
Group key |
field |
Field key |
meta |
Meta key shortcut (alternative to group+field) |
post_id |
Another post’s value (defaults to current) |
format |
display (default), raw, html, url, text |
default |
Fallback when empty |
Password fields never output the secret. Invalid group/field returns empty (no PHP warning).
Content / dynamic tag
Section titled “Content / dynamic tag”In post content or text widgets:
{wp_powersuite_cf:book_details:subtitle}Syntax: {wp_powersuite_cf:GROUP_KEY:FIELD_KEY}
Gutenberg block
Section titled “Gutenberg block”Insert PowerSuite Custom Field (wp-powersuite/custom-field):
- Pick group and field in the block sidebar
- Optionally set format and default
- Preview in the editor; front end matches the shortcode output
Page builders
Section titled “Page builders”When the builder is installed and active:
| Builder | Integration |
|---|---|
| Elementor | PowerSuite dynamic tags (group + field) |
| Bricks | Dynamic tags list + render filters |
| Divi | Dynamic content fields |
| Beaver Themer | Dynamic field properties |
Nested, layout-only, and password fields are excluded from pickers. Empty values render blank (or your default), not PHP notices.
PHP helpers (themes & snippets)
Section titled “PHP helpers (themes & snippets)”// By meta / field key (current post)$subtitle = wps_cf_get( 'subtitle', get_the_ID(), '' );
// By group + field$subtitle = wps_cf_get_field( 'book_details', 'subtitle', get_the_ID(), '' );
// Term meta$icon = wps_cf_get_term( 'icon', (int) $term_id, '' );
// Link field as array: url, title, target$cta = wps_cf_get_link( 'cta', get_the_ID() );
// Image / file attachment → URL$url = wps_cf_get_image_url( wps_cf_get( 'cover', get_the_ID() ), 'large' );
// Media return helper (id|url)$id_or_url = wps_cf_format_media( wps_cf_get( 'cover' ), 'url', 'large' );
// Escaped HTML for templates / integrationsecho wps_cf_render_field( 'book_details', 'subtitle', get_the_ID(), [ 'format' => 'display', 'default' => '',] );
// Formatted display value (not always a string)$display = wps_cf_get_display( 'book_details', 'subtitle', get_the_ID() );Always escape for context (esc_html, esc_url, wp_kses_post) when you print raw helper results yourself. Prefer wps_cf_render_field() when you want the module’s safe formatting.
REST API
Section titled “REST API”- Enable Show in REST API on the group.
- Fields appear on post (and registered term) REST routes for viewers who can read that object.
- Layout fields are not exposed.
- Password fields are never registered / never in the payload.
- Invalid required writes should return an error response — not a fatal PHP error.
Example: GET /wp-json/wp/v2/posts/{id} (and equivalent CPT routes).
Storage & data model
Section titled “Storage & data model”| Item | Detail |
|---|---|
| Definitions option | wp_powersuite_cf_groups |
| Schema version | 3 |
| Autoload | No (not autoloaded) |
| Post values | wp_postmeta — field key = meta key |
| Term values | wp_termmeta — field key = meta key |
| Uninstall | Declared data locations for cleanup with the plugin |
Because the field key is the meta key, keep keys stable once templates and builders depend on them. Renaming a key does not automatically migrate existing meta.
Security notes (commercial / client sites)
Section titled “Security notes (commercial / client sites)”- Password fields: hashed at rest; blank save keeps the existing hash; input uses password UI with “leave blank to keep”; never appear in shortcodes, tags, blocks, builders, list columns, REST, or page HTML.
- REST respects WordPress capabilities (
read_postand equivalent term rules). - Do not expose private post meta to logged-out visitors via custom templates — check caps the same way you would for any meta.
- Prefer one fields system per site to avoid duplicate metaboxes and conflicting meta keys.
When to use it
Section titled “When to use it”Enable Custom Fields if you:
- Need structured data on posts, pages, CPTs, or terms without a separate ACF-style plugin
- Ship content models agencies and clients can maintain in wp-admin
- Want the same values in theme templates, shortcodes, blocks, and builders
- Need repeaters, flexible layouts, conditionals, or bidirectional relationships
- Migrate content models between environments via JSON
When not to use it
Section titled “When not to use it”How to enable it
Section titled “How to enable it”- Install and activate the free WP PowerSuite plugin.
- Install WP PowerSuite Pro beside it (do not replace the free plugin).
- Activate your license under WP PowerSuite → License.
- Go to WP PowerSuite → Modules → Content (or search Custom Fields).
- Toggle Custom Fields on.
- Open WP PowerSuite → Custom Fields and create a field group.
Toggle the module off anytime to stop it from loading. Stored meta values remain in the database; definitions remain in the option until uninstall cleanup runs.
How to test it (acceptance checklist)
Section titled “How to test it (acceptance checklist)”Use this before handing a site to a client:
- Create a post group with Text + Image; enable; save.
- Edit a matching post → fields appear → save → reload → values persist.
- Add
[wpps_cf group="…" field="…"](or the block) → front end shows the value. - Add a taxonomy group → term screens show fields → values in term meta.
- Add a conditional (toggle shows a text field) → live show/hide works.
- Add a repeater with two sub-fields → add/reorder rows → persist.
- Enable Show in admin list table → column appears with sensible output.
- Export JSON → delete group → import (disabled) → enable → group restored.
- With REST on, fetch the post as admin → field present; password absent; subscriber cannot read private posts’ private meta.
- ❌ Fail path: confirm Pro license, group Enabled, and location rules match the screen you are editing.
Troubleshooting
Section titled “Troubleshooting”| Symptom | What to check |
|---|---|
| Builder missing / license notice | Pro installed beside free plugin; license active under WP PowerSuite → License |
| Fields not on edit screen | Group Enabled; location rules match post type / taxonomy / role / template; not editing an excluded screen |
| Shortcode / tag empty | Group key + field key (Usage panel); post_id if needed; value actually saved; not a password field |
| Block empty | Field still exists; group enabled; format/default settings |
| Builder tag missing | Builder plugin active; field is integratable (not nested/layout/password) |
| REST empty | Show in REST API on; authenticated user can read the post/term; not a layout/password field |
| Import fails | Valid JSON under 1 MB; depth ≤ 32; prefer import-as-disabled |
| Conflicts with another fields plugin | Disable overlapping metaboxes temporarily; avoid shared meta keys |
| 404 / missing CPT context | Ensure CPT exists (CPT Builder or code) before attaching location rules |
Manage with WP-CLI
Section titled “Manage with WP-CLI”Prefer the command line? You can turn this module on or off with WP-CLI instead of the dashboard:
# Turn the module onwp powersuite module enable custom-fields
# Turn the module offwp powersuite module disable custom-fields
# Check whether it is on, its category, and where its settings livewp powersuite module get custom-fieldsManaging more than one site? Add --url=https://example.com to point a command at one site. If this is a Pro module, install WP PowerSuite Pro and activate your license first. New to WP-CLI? See the full command guide.
What does Custom Fields do?
It builds field groups for post and term meta, with location rules, conditionals, nested fields (group, repeater, flexible content, clone), REST exposure, and multiple front-end display methods.
Is Custom Fields included in WP PowerSuite Pro?
Yes. Custom Fields ships in the WP PowerSuite Pro add-on. Install Pro beside the free plugin and activate your license.
Where do I manage field groups?
Open WP PowerSuite → Custom Fields after enabling the module.
How do I show a field on the front end?
Use [wpps_cf] / [wp_powersuite_cf], the {wp_powersuite_cf:group:field} tag, the PowerSuite Custom Field block, page-builder dynamic tags, or PHP helpers such as wps_cf_get_field() and wps_cf_render_field().
Is the field key the same as the meta key?
Yes. The field key is stored as the WordPress meta key on posts or terms. Keep keys stable once templates depend on them.
Is this the same as Options Page Builder?
No. Custom Fields stores post and term meta. Options Page Builder creates site-wide settings screens. User profile fields are out of scope for this module.
Can I import or export groups?
Yes. Use Export / Export All and Import on the Custom Fields list screen (JSON, schema version 3). Definitions only — not post/term values.
Do password fields appear on the front end?
No. Password values are hashed and are never output by shortcodes, tags, blocks, builders, list columns, or REST.
How do I turn Custom Fields off?
Go to WP PowerSuite → Modules, find Custom Fields, and toggle it off. Stored meta remains until you delete it or uninstall with cleanup.
Developer notes (hooks & filters)
Source: modules/custom-fields/ (module version 1.10.4).
- Boot:
critical· context:admin,frontend,ajax,rest - Admin page:
powersuite-custom-fields - Storage:
Storage/ optionwp_powersuite_cf_groups(schema 3, not autoloaded) - Core:
Validator,RuleEngine,LocationRules,LocationTargets,NestedFields,Relationships,Fields,Locations - UI:
Admin,MetaBoxes,PostEditForm,TermFields,BlockEditor,AdminColumns,ImportExport,CptBridge,FieldGroupListTable - Output:
FieldOutput,RestMeta,EditorSchema,MetaKeys - Integrations:
shortcode.php,content-tags.php,gutenberg.php,elementor.php,bricks.php,divi.php,beaver-themer.php
Public helpers: wps_cf_get(), wps_cf_get_field(), wps_cf_get_term(), wps_cf_get_link(), wps_cf_get_image_url(), wps_cf_format_media(), wps_cf_get_integratable_fields(), wps_cf_render_field(), wps_cf_get_display(), wps_cf_resolve_meta_key().
Notable hooks include group update actions, block editor asset enqueue, and rest_api_init registration when REST is enabled on a group. Data locations are declared for uninstall cleanup.