Oxygen Classic
2 min read
With Oxygen Classic 4.0 or newer active, your fields are offered as dynamic data, and a shortcode covers the places where Oxygen only accepts a shortcode. This is free. Oxygen 6 is a different product built on Breakdance; see Breakdance.
Dynamic data entries
In an Oxygen element's dynamic data menu, the group WPM Fields has three entries. Each has one property, Field, a select of "Field group › Field" entries:
Entry | Oxygen mode | Used for | What it prints |
|---|---|---|---|
WPM field value | content | Text and headings | The value as escaped plain text |
WPM field URL | link | Link targets | The field's URL, escaped as a URL |
WPM field image | image | Image sources | The image address (first image of a Gallery), escaped as a URL |
Fields offered: for the value entry every field with a value except Password and layout fields; for the URL entry URL, Link, Email, File, Image, Page link, Post object and oEmbed; for the image entry Image and Gallery.
The [wpmcf_oxygen] shortcode
Use the shortcode in Oxygen's Shortcode dynamic data or in any link or image URL input that accepts a shortcode:
[wpmcf_oxygen key="product.price"]
[wpmcf_oxygen key="product.cta" format="url"]
[wpmcf_oxygen key="product.photo" format="image" size="medium"]Attribute | Default | Meaning |
|---|---|---|
| none | The field reference: |
|
|
|
|
| For |
The output is always escaped, because Oxygen prints dynamic data as it is. For the formatted HTML of a field (a Link as an <a>, a Repeater as a list) use the general shortcode [wpmcf_field group="…" field="…"] in a Shortcode element (see Output, formats and escaping).
Which post is read
Always the current post. The shortcode has no id attribute (an id is ignored), so an editor cannot read fields of posts they could not see. Options page groups need no post; in the content of a post, their values print only if the post's author may open the options page (see Page builders overview).
Troubleshooting
- The WPM Fields group is missing. Oxygen Classic must be 4.0 or newer and active. Oxygen 6 uses the Breakdance entries.
- The shortcode prints nothing. The
keyis wrong or empty, the field is empty on the current post, orformatis not one oftext,urlandimage. - A link or image gets the wrong kind of value. Use
format="url"for links andformat="image"for images; the defaulttextformat is for text.
Still stuck? Contact support