Meta Fields

5 min read

Meta Fields let you add extra details to your posts, terms, and settings pages. This can be a price, a phone number, a date, or anything else your content needs.

What Are Meta Fields? #

Custom input fields attached to your content. Each field has a Name/ID, the machine-readable key used to store and retrieve its value.

Field LabelName/IDTypeWhat It Stores
Client Nameclient_nameTextA short text like “Acme Corp”
Project URLproject_urlURLA website link
Launch Datelaunch_dateDateA date like 2024-06-15
Featured Projectis_featuredToggleYes or no
Project Galleryproject_galleryGallery (Pro)Multiple images

Add Meta Fields with Dynamic CPT #

  1. Go to Dynamic Engine from the WordPress sidebar.
  2. Click More in the top navigation.
  3. Select Metabox from the dropdown.
In Dynamic CPT's dashboard click More and find Metabox

Click + Add Metabox to create a metabox.

Quick Setup #

Field Group Title: Type the name of your metabox here (e.g., “Employee”). The rest will be auto-generated.

Below the title, you can see a quick summary showing the current location rule (Post Type is “post”) and the number of fields added (0 fields by default).

Basic Settings #

Details –

Description (optional): This description helps you identify the metabox’s purpose late

Write details under Basic Settings

Location Rules: These rules control where this metabox appears. It shows the field group only when the set condition is met.

You can click + Add Rule to add multiple AND conditions within the same group, or + Add OR Rule Group to add a separate set of conditions.

Location Rules under Basic Settings of metabox

The rule has three parts: what to check, how to compare, and what to match.

  • First dropdown sets what to check, like Post Type, Post Status, Page Template, Post Author, Taxonomy, Term, and more.
  • Second dropdown sets the condition, either is equal to or is not equal to.
  • Third dropdown sets the value, like Post, Page, or any custom post type such as Roxnor BD.

For example, if you select Post Typeis equal toRoxnor BD, the metabox will only appear when editing a post of the “Roxnor BD” custom post type.

Select post type
set condition for showing specific post type
set value to match for showing a specific post type

Fields #

Under the Fields tab, you’ll find the Meta Fields section. By default, it shows “No Meta Fields Yet.” Click + Add First Field to start adding custom fields to collect additional data for your content.

Add meta fields under Fields of Metabox

Customize the fields –

  • Label: Set the label name (e.g. Products)
  • Name/ID: The unique key used to identify the field in code (e.g. products)
  • Field Type: The input format; dropdown options include: TextTextareaNumberEmailURLSelectCheckboxRadioDateImageFile, and more.
  • Field Width: Controls how much horizontal space the field takes; dropdown options: 25%50%75%100%

However, some field types come with their own settings. For example, selecting User Picker reveals:

  • Filter by Roles: Limit which users appear by role, such as AdministratorEditorAuthorSubscriber, etc. You can also leave it empty to show all
  • Multiple: Toggle on to allow multiple selections; default is single selection
  • Return Format: Choose how the value is saved: User IDs or User Objects
Options based on field type
  • Description: Help text shown below the field to guide the user
  • Max Characters: Sets a character limit; leave empty for no limit
  • Required: Toggle on to make the field mandatory before form submission
  • REST API: Toggle on to expose this field via the WordPress REST API
  • Quick Edit: Allows editing the field value directly from the post list screen
  • Revisions: Saves field value history along with post revisions
Adjust a field's labels
  • Conditional Logic: Conditional Logic is the feature that lets you show or hide a field based on the value of another field.
    For example: display the “Products” field only if “Status” equals “Available.” To set it up, you need at least one other field to use as the condition, then define a rule (Field → Operator → Value), and then done/save to apply it.
Setting conditional logic for a meta field

Remember that, to set conditional logic on a field, you first need at least one other named field to use as the condition.

Condition to set conditional logic to a meta field
  • Pattern Validation: This option lets you enforce a specific format for a field’s value using a regex pattern.
    • Regex Pattern: Enter a PCRE regex (e.g. ^[A-Z]{2}\d{4}$ for 2 letters + 4 digits). If you enter a bare pattern without slashes, it’s auto-wrapped in /.../.
    • Error Message: The custom message shown to the user if their input doesn’t match the pattern.

This ensures the field only accepts values in the format you define (like a specific code, phone number, or ID format).

Set pattern validation for a meta field

Customize the Tab –

It lets you group a set of fields together under a tab. You can pick a horizontal or vertical layout, and optionally control when the tab itself appears with conditional logic or validate its content with a pattern.

Organizing Tab for a meta field

Customize the Accordion –
Here, you can create a collapsible section for fields. It helps keep long forms organized. It also supports its own conditional logic and pattern validation.

Customize the Endpoint –

A simple marker used to close/end the current Tab or Accordion section. After closing, the fields after it are no longer nested inside it. There are also options for its own Label/Name settings, the same as a regular field.

Setting Endpoint for a meta field

Presentation #

This is a settings tab for controlling how a metabox looks and behaves.

Match Priority –

  • Loading priority: Higher values load first (0–100), defaults to 10. It’s useful when multiple metaboxes match the same screen; ties fall back to creation order.

Display Options –

  • Position: Where to display the field group, Default (after content) or Side.
  • Label Placement: Where to place field labels, Top aligned or Left aligned.
  • Instruction Placement: Where to display field instructions, Below labels or Below fields.
Display options under presentations of metabox
Updated on July 26, 2026

What are your feelings

  • Happy
  • Normal
  • Sad