Skip to main content

Inline field tags

Use inline field tags when you want a short custom-field value inside plain module text without opening Insert Dynamic Content on every text node. Tags are a lightweight shortcut. Prefer Insert Dynamic Content (and Machine modules such as Custom Field Item) for maps, media, dates, and structured layouts—see Native modules and dynamic content.

Enable inline tags​

  1. Go to Divi Engine → Divi Machine → Settings → General.
  2. Under Divi 5 inline tags, turn on Enable inline dynamic field tags.
  3. Save settings.

When the option is off, visitors see the raw {dm:…} text (if present). Leave it off only when you intentionally need to display the tag string.

Tag syntax​

Tags are case-sensitive and must stay inside braces with no spaces. Grammar:

{prefix:field_name[:object:id][:fallback:text]}

  • Field name: letters, digits, _, ., or -
  • If you use both an object scope and a fallback, put the object segment before the fallback
  • Resolved values are not scanned again for nested tags

Provider prefixes​

TagMeaning
{dm:field_name}Active custom field provider (auto)
{dm_acf:field_name}Force Advanced Custom Fields
{dm_scf:field_name}Force Secure Custom Fields
{dm_pods:field_name}Force Pods
{dm_mb:field_name}Force Meta Box
{dm_ts:field_name}Force Toolset Types
{dm_acpt:field_name}Force ACPT

Use an explicit prefix when more than one field stack is active and auto-resolution is ambiguous. See Custom fields and providers.

Object scope and fallbacks​

TagMeaning
{dm:price}Field on the current context post
{dm:price:post:123}Field on post ID 123
{dm:bio:user:1}Field on user ID 1
{dm:label:term:5}Field on term ID 5
{dm:price:fallback:N/A}Show N/A when the field is empty
{dm:price:post:123:fallback:N/A}Scoped post plus fallback

Where tags resolve​

When enabled, Machine replaces tags on the front end in layout content (including Divi-rendered layouts). Default post context order:

  1. Current Archive Loop / loop card post (when present)
  2. Main query post
  3. Singular queried object
  4. get_the_ID() / global $post

Inside custom loop layouts and Archive Loop cards, tags therefore read the card’s post, not the Theme Builder layout post.

When to use tags vs other tools​

NeedPrefer
Short text in a Text / Blurb / button labelInline {dm:…} tags
One typed field with label, icon, visibilityCustom Field Item
Map, gallery, countdown, video, countersInsert Dynamic Content on the native module
Repeater rows, tables, tabsRepeater + Custom Field Item

Debug logging​

If a tag does not replace as expected:

  1. Confirm Enable inline dynamic field tags is on.
  2. Confirm the field key matches your provider and that the post/user/term has a saved value.
  3. Temporarily add to wp-config.php:
wp-config.php
define( 'DMACH_DEBUG_INLINE_VARIABLES', true );
  1. Load the front end once and check wp-content/debug.log for lines starting with [DMACH inline].
  2. Remove or set the constant to false after you finish debugging.

Pitfalls and limits​

  • Tags only run on the front end (not in admin or REST responses).
  • Wrong field keys print empty (or your fallback)—they do not throw visible builder errors.
  • Do not put complex HTML structures inside a single tag; keep tags for simple scalar values.
  • Nested tags inside a resolved value are ignored.

What's Next​