Skip to main content

MetaBox Fields

MetaBox integration

This article covers MetaBox integration with built-in dynamic data in Builderius. MetaBox fields appear automatically in the Dynamic Data dropdown when you create and populate them, and can be added to any element without custom queries.

How MetaBox Fields Appear in Builderius

MetaBox fields are automatically available in the Dynamic Data dropdown. Builderius supports all field types in all WordPress locations. There are 3 types of fields:

  • Simple Fields (text, number, select...) appear as single options you can click to add
  • Object Fields (images, files, post relationships...) appear within expandable options as subfields
  • Array Fields (cloneable groups...) can be used as Collection data sources

Screenshot showing the dynamic data modal with MetaBox WordPress data sources of different types

Adding Simple and Complex Fields

  1. Simple MetaBox fields appear the same as built-in fields and can be added with a single click
  2. Complex MetaBox fields that have subfields (these are object fields) appear as toggles. Once you click such a field, it expands to show subfields
  3. MetaBox Subfields act the same way as simple fields and can be added with a single click

Adding fields with multiple instances

Multiple instance fields expose their data as an array. They have to be added to Collection element, and their content is then added same way as other loops. These fields are:

  • Cloneable group fields
  • Multiple post/user/taxonomy relationship fields
  • Multiple image/file fields
  • Any field with cloneable option enabled

Naming Convention

Simple Fields

ContextDynamic Data Tag PatternDescription
Posts/Pages[[wp.post.mb_field__field_id]]Text, select, date, number, checkbox fields
Settings Pages[[wp.settings_page_name__field_name]]Site-wide settings page field values (Pro)
Users[[wp.current_user.mb_field__field_id]]User profile simple field values (Pro)
Post Authors[[wp.post.author.mb_field__field_id]]Post author simple field values (Pro)

Complex Fields (Objects with Subfields)

ContextDynamic Data Tag PatternDescription
Posts/Pages[[wp.post.mb_field__field_id.subfield]]Image, file, background, post, user, taxonomy fields
Settings Pages[[wp.settings_page_name__field_name.subfield]]Settings page object fields with expandable properties (Pro)
Users[[wp.current_user.mb_field__field_id.subfield]]User object fields with expandable properties (Pro)
Post Authors[[wp.post.author.mb_field__field_id.subfield]]Author object fields with expandable properties (Pro)

Array Fields (Collection Data Sources)

ContextDynamic Data Tag PatternDescription
Posts/Pages[[wp.post.mb_field__field_id]]{{mb_field__subfield}}Cloneable groups, multiple relationships
Settings Pages[[wp.settings_page_name__field_name]]{{mb_field__subfield}}Settings page cloneable groups (Pro)
Users[[wp.current_user.mb_field__field_id]]{{mb_field__subfield}}User cloneable fields (Pro)
Post Authors[[wp.post.author.mb_field__field_id]]{{mb_field__subfield}}Author cloneable fields (Pro)

Field Types in Dynamic Data

Simple Field Types

  • Text, Textarea, Number, Email, URL → Direct values: [[wp.post.mb_field__field_id]]
  • Select, Radio, Checkbox List → Selected values: [[wp.post.mb_field__field_id]]
  • Switch, Button Group → Selected values: [[wp.post.mb_field__field_id]]
  • Date, Time, Datetime → Formatted dates: [[wp.post.mb_field__field_id]]
  • Color → Color values: [[wp.post.mb_field__field_id]]

Complex (object) Field Types

  • Image → Expandable with .url, .alt, .title, .width, .height subfields
  • File → Expandable with .url, .name, .path, .title subfields
  • Background → Expandable with .color, .image, .position, .size subfields
  • Post → Expandable with .post_title, .ID, .guid, .post_content subfields
  • User → Expandable with .display_name, .user_email, .avatar_url subfields
  • Taxonomy → Expandable with .name, .slug, .description subfields

Array Field Types

  • Group (Cloneable) → Use as Collection data source: [[wp.post.mb_field__group_id]]
  • Post (Multiple) → Use as Collection for multiple posts
  • User (Multiple) → Use as Collection for multiple users
  • Image (Multiple) → Use as Collection for multiple images

Usage Examples

Text, Number, Select Fields:

<!-- Event page example -->
<div class="event-details">
<h2>[[wp.post.title]]</h2>
<div class="date">[[wp.post.mb_field__event_date]]</div>
<div class="time">[[wp.post.mb_field__event_time]]</div>
<div class="venue">[[wp.post.mb_field__venue_name]]</div>
<div class="capacity">Max attendees: [[wp.post.mb_field__max_attendees]]</div>
</div>

Key Differences: MetaBox vs ACF

FeatureMetaBoxACF
Tag prefixmb_field__acf_field__
Field identifierUses field IDUses field name
Case conversionLowercaseAs-is
Example[[wp.post.mb_field__my_field]][[wp.post.acf_field__my_field]]
Settings Pages[[wp.mb.page_name__field]][[wp.acf_options_field__field]]
Group FieldsCloneable groupsRepeater fields