Dynafield – Custom Field Dynamic Tags for Elementor

Description

Custom field dynamic tags for free Elementor. Dynafield adds a Custom Fields group to Elementor’s dynamic tags menu, so a Heading, Text Editor, Image, Button, Counter or any other widget setting that takes dynamic text, links, images, galleries, numbers or colours can show a value from Advanced Custom Fields (ACF), Secure Custom Fields (SCF), Pods, Meta Box, post meta, term meta, user meta or a site option. Elementor Pro is not needed.

Pick a field, done: each tag has a field picker that lists the custom fields of the source you choose, and most tags have formatting options and a fallback for when the field is empty.

Features

  • Seven tags, one per output type: Field (Text), Field (URL), Field (Image), Field (Gallery), Field (Number), Field (Colour) and Field (Date).
  • Every common field source: ACF, Secure Custom Fields, Pods, Meta Box, core post meta, term meta, user meta and site options.
  • Seven places to read from: Current post, Post author, Current term, Current user, Options page, Site option and Specific post ID.
  • Field picker in the tag settings: ACF/SCF field groups, Pods fields, Meta Box fields and the custom field keys used by the post type you are editing, labelled with the field type. You can always type a key by hand instead.
  • Formatting for text: date (any PHP date format), number (decimals, decimal point, thousands separator), UPPERCASE, lowercase and Capitalize Words. Fields that hold several values are joined with a separator you choose.
  • Fallbacks: text to show when a field is empty (Text, Date and Number tags), a fallback URL, a fallback image and a fallback colour. The Gallery tag has no fallback. The Text and Date tags also have Before and After text.
  • Links done right: URL and link fields, page links and post objects (permalink), file fields (file URL), email addresses (mailto:) and phone numbers (tel:). Unsafe links such as javascript: are removed.
  • Images and galleries: image fields stored as an ID, an array or the URL of an image in your media library, plain attachment IDs, and comma-separated ID lists. The Image tag uses the first image of a gallery field. The widget chooses the image size.
  • Dates: reads ACF date picker values (Ymd), Unix timestamps and ISO 8601 dates automatically, or a stored format you name. Shows them in the site date format, the site date and time format, a custom format, or as relative time (“3 days ago”).
  • Safe by default: output is escaped for its context. The optional “Allow HTML” switch keeps only the HTML allowed in post content.
  • No front-end scripts or styles. The field picker script loads only in the Elementor editor.

How it works

  1. Edit a page with Elementor and select a widget such as Heading, Image, Button or Counter.
  2. Click the Dynamic Tags icon next to a setting and choose a tag from the Custom Fields group.
  3. In the tag settings pick the Source and the Field (or type its key), then set the fallback and the format.

The value is read when the page is shown. Current post reads the post being shown, or the current post of a loop. Current term reads the term of a category, tag or taxonomy archive, or the term whose ID you enter. Current user reads the logged-in visitor, and Post author reads the author of the current post or of an author archive. Free Elementor edits single pages and posts; archive and single post templates come from Elementor Pro’s Theme Builder or another theme builder.

When a key is typed without a prefix, Dynafield asks ACF/SCF, Pods and Meta Box in that order whether they define a field with that name, and otherwise reads the plain post, term or user meta value (or the site option). Prefix the key with acf:, pods:, metabox: or meta: to choose the source yourself; the picker does this for you.

Privacy and protected data

  • Keys starting with an underscore are hidden from the field picker unless you list them under Settings Custom Field Dynamic Tags. A key typed by hand is still read, unless it is on the blocked list below.
  • Some keys are never read by any tag, whatever the source and even when typed by hand: session_tokens, wp_capabilities, wp_user_level, admin_email, new_admin_email, mailserver_login, recovery_keys, community-events-location, any key containing password, passwd, token, secret, key_ or salt, and any key ending in capabilities, user_level, user_roles, _key or _pass.
  • The Site option source only reads option names an administrator lists on the settings screen (by default the site title and tagline).
  • With Specific post ID, visitors only see fields of published, publicly viewable posts without a password. In the Elementor editor you also see posts you are allowed to read.
  • With a Term ID, visitors only see fields of terms in public taxonomies. In the Elementor editor you also see terms you are allowed to edit.
  • Options pages are read only for fields the field plugin defines, never as raw options.
  • The plugin makes no requests to other servers, sets no cookies and collects no data.

Compatibility

  • Requires Elementor 3.25 or newer. Tested with free Elementor 3.25.11, 3.33.6, 4.2.2 and 4.3.4, with classic widgets. Elementor Pro is not needed and was not part of the tests.
  • Elementor 4 atomic widgets are supported on a best-effort basis: the tags are offered there, but without the field picker, so type the field key.
  • Tested with ACF 6 (free), Secure Custom Fields 6, Pods 3 and Meta Box 5. Options pages with their own storage name and gallery fields, which ACF only has in PRO, were tested with Secure Custom Fields. Meta Box fields were tested on posts; Meta Box term, user and settings-page fields need Meta Box extensions, which were not tested.

Developers

  • Filter dynafield_sources: add a source (an object implementing Dynafield\Sources\SourceInterface).
  • Filter dynafield_resolve_value: change the raw value a tag reads.
  • Filter dynafield_format_value: change a tag’s formatted value before it is escaped.
  • Filter dynafield_capability: the capability for the settings screen (default manage_options).
  • REST route dynafield/v1/fields?source=&post_type= (users who can edit posts) feeds the field picker. Each list is cached for 10 minutes; the settings screen has a button to clear the cache.

More plugins by Emtiaz Zahid

  • Launchmender: 44 pre-launch checks with one-click fixes, a manual checklist and a client handoff report
  • Faultwright: PHP errors, JavaScript errors, failed cron jobs, emails and updates on one timeline
  • Stalemender: content audit that gives every post a Freshness Score (0–100) and tells you why
  • Waymender: finds broken links without hammering your server, logs 404s and fixes both in one click
  • Anchormender: internal link suggestions while you write, an orphan post report and bulk internal linking
  • Repeatwright: RFM customer segments, repeat rate, LTV and cohort retention from your own WooCommerce orders
  • Hoverbuy: sticky add to cart bar with image, price and quantity once the real button scrolls away, variable products included

Screenshots

Installation

  1. Install and activate Elementor.
  2. Upload the plugin folder to /wp-content/plugins/ or install it from the Plugins screen, then activate it.
  3. Edit a page with Elementor and look for the Custom Fields group in any dynamic tags menu.
  4. Optional: review Settings Custom Field Dynamic Tags to see the detected field plugins, allow underscore keys in the picker and choose which site options tags may read.

FAQ

Do I need Elementor Pro?

No. Free Elementor has the dynamic tags system built in but ships no tags of its own; Dynafield adds them. Its tags use their own Custom Fields group and their own names, separate from the tags Elementor Pro adds.

Does it work with Secure Custom Fields as well as ACF?

Yes. Values are read unformatted with get_field( $name, $id, false ) and formatted by Dynafield, so ACF and Secure Custom Fields behave the same.

Can I show repeater or flexible content rows?

Not in this version. Repeater and flexible content rows need a loop that repeats a template for each row, and free Elementor has no loop builder. Fields inside an ACF group field work: they are listed as group_subfield.

How do I show a field from an options page?

Choose the Options page source and pick the field. Fields of ACF and SCF options pages that use the default option storage need no extra name. Pages with their own storage name (an ACF/SCF options page with its own post ID, a Pods settings page, a Meta Box settings page) are named after @, for example pods:phone@site_settings. The picker fills this in for you.

Where does the value come from on archive templates?

On a category, tag or custom taxonomy archive the Current term source reads that term, and on an author archive Post author reads that author. Inside a loop or a single post template, Current post reads the post being shown. Archive and single post templates need Elementor Pro’s Theme Builder or another theme builder; on an ordinary page, enter a Term ID for Current term.

Do the tags work with Elementor 4 atomic widgets?

On a best-effort basis. Elementor 4 lists the tags for atomic widgets, but the field picker is only available in the classic widget panel, so type the field key there.

Why is my field missing from the picker?

The list is cached for 10 minutes; click Clear field list cache on the settings screen after adding fields. Keys that start with an underscore are hidden unless you allow them there, and blocked keys (passwords, tokens, secrets and similar) are never listed. You can always type a key that is not blocked; Site option names must also be listed on the settings screen.

What happens when a field is empty?

The tag shows its fallback: the Fallback text for the Text, Date and Number tags, or the fallback URL, image or colour for the URL, Image and Colour tags. The Gallery tag has no fallback. With no fallback the widget shows nothing for that setting.

Does the plugin send anything to its author?

No. Dynafield has no server of its own, sends no usage statistics or telemetry, and makes no requests to other servers.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Dynafield – Custom Field Dynamic Tags for Elementor” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Initial release: seven dynamic tags (text, URL, image, gallery, number, colour, date) for ACF, Secure Custom Fields, Pods, Meta Box, post, term and user meta and site options, with the field picker, formatting, fallbacks and the settings screen.