Elementor
5 min read
Mass Custom Fields works with Elementor 3.5 or newer. What you get depends on the Elementor edition and your plan:
Feature | Elementor (free) | Elementor Pro | Plan |
|---|---|---|---|
Field widget | Yes | Yes | Free |
| Yes | Yes | Free |
Hide elements by saved display conditions | Yes | Yes | Free |
Dynamic tags "Field", "Field URL", "Field image" | Tags render, but the picker is in Pro | Pick them in the editor | Free |
Editing display conditions, widgets Repeater, Field gallery, Post grid, Data table list, Field form | Yes | Yes | Pro |
Elementor's dynamic tag picker is part of Elementor Pro, so choosing a tag in the editor needs Elementor Pro. The Field widget, variables and conditions work in the free Elementor.
Dynamic tags (Elementor Pro)
In an element's setting that supports dynamic content, click the Dynamic (database) icon and open the group WPM Fields:
Tag | Used for | Settings |
|---|---|---|
Field | Text, number and post meta settings (a heading, a text editor, a number) | Field (a list of "Group › Field" entries, one section per field group); Output: Plain text (default) or Formatted HTML |
Field URL | Link and URL settings (a button link, an image link) | Field: URL, Link, Email, File, Image, Page link, Post object and oEmbed fields |
Field image | Image settings (an Image widget, a background) | Field: Image and Gallery fields (a Gallery gives its first image); Fallback: an image used when the field has none |
All three need a field to be chosen. The value comes from the post Elementor is rendering; inside an Elementor Pro loop, from the loop item. Field groups that appear only on an options page are read from the options values (see Page builders overview for the rules).
The Field widget
Drag the Field widget from the WPM Fields category onto the page. It prints one field of the current post, or of an options page. It works in the free Elementor.
Content settings (section "Field")
Control | Default | Effect |
|---|---|---|
Field | none | The field to print, listed as "Group › Field". An empty choice shows the hint "Choose a field." to editors. |
Output | Formatted | Formatted (the field type's own markup), Plain text, Link or Image. |
Link text | empty | Shown when Output is Link. Empty uses the field value as the link text. |
Image size | Large | Shown when Output is Image: a registered image size or Full size. |
HTML tag |
|
|
Before | empty | Text printed before the value. |
After | empty | Text printed after the value. |
When empty | empty | Text printed when the field has no value. |
A Link needs something to link to: URL, Link, Email, File, Image, Page link and Post object fields work, and so does a text value that is a valid web address. Other values print nothing. An Image takes Image and Gallery fields (first image).
What it prints
<h2 class="wpmcf-c-field">
<span class="wpmcf-c-field__affix">Price: </span>
<span class="wpmcf-c-field__value">10</span>
<span class="wpmcf-c-field__affix"> EUR</span>
</h2>- Before and After only appear when there is a value. When empty prints in the same wrapper element, as plain text, without Before and After.
- With no value and nothing in When empty, visitors see nothing. In the Elementor editor the widget shows the hint "This field is empty here." so you can see where it sits.
- Leading and trailing spaces in Before and After are kept ("Price: " stays apart from the value).
- Password fields print nothing.
- A HTML tag value outside the list is replaced by
div.
Style tab
Section | Controls |
|---|---|
Field | Alignment, Margin |
Value | Typography, Color |
Before and after | Typography, Color |
Image | Width, Border radius, Border, Box shadow |
{{ }} variables in widget settings
Any text setting of any Elementor widget (not only WPM widgets) may contain {{ expression }}. The expression is evaluated when the page is rendered on the front end. Typical uses: a heading that says "Price {{ fg.product.price }}", a button label, a link.
Heading: Price: {{ fg.product.price }} for {{ wp.post_title }}
Button link: https://example.com/order?item={{ fg.product.sku }}The expression language is described in Variables and hooks: fg.group.field reads a field, glb.key a Global Data value, wp.post_title the post title.
Rules:
- The value is inserted as plain text, escaped. HTML in a field value is shown as text, and shortcode brackets are encoded so shortcodes in field values never run. HTML that you typed around the expression stays as you typed it.
- In a link setting, a link that is exactly one expression takes the value as the URL (cleaned as a URL). In a longer address such as the example above, each inserted value is URL-encoded.
- An expression that cannot be evaluated is replaced by nothing.
- Settings whose names start with an underscore (Elementor's internal settings) are left alone.
- Nested settings (repeater items inside a widget) are handled up to four levels deep.
- The field values come from the current post. Elements with expressions are kept out of Elementor's element cache, so every post gets its own values.
Display conditions
Every widget, section, column and container has a WPM Conditions section on its Advanced tab. See Elementor display conditions.
Pro widgets
Repeater, Field gallery, Post grid, Data table list and Field form need a Pro plan: Post grid and Repeater, gallery and other widgets.
Troubleshooting
- There is no WPM Fields category. Elementor is older than 3.5 or not active. Elementor must be active when the page loads.
- The Dynamic icon is missing. Elementor's dynamic tags need Elementor Pro. Use the Field widget or
{{ }}variables with free Elementor. - The widget shows the hint "Choose a field." No field is selected. Pick one in the Field control.
- The widget is blank on the live page. The field is empty for that post, or you are looking at a page whose post has no row for the field's group. Use When empty to show a fallback.
{{ }}appears literally. The page is not rendered on the front end (an editor preview), the expression is inside a setting whose name starts with an underscore, or the expression syntax is wrong. Check the live page.- Options page values are blank on a page written by an author who is not an administrator. See Page builders overview.
Still stuck? Contact support