Dynamic Data allows you to link design elements created in Oxygen to data from your WordPress database.
For example, you can link a heading element in your blog post template to the Post Title in the database. The title for each blog post will be placed in the heading element. Similarly, you can link a text element to your post content or link an image or section background to your post's featured image.
Inserting Dynamic Data
To insert dynamic data into any text-based element, double click the text to edit it.
Then click Insert Data in the top toolbar to open the Insert Dynamic Data Dialog.
Certain properties can be set with Dynamic Data. These properties have a data button on the right side of their input box. Click this button to open the Insert Dynamic Data dialog.
This functionality allows you to do things like setting a section background image URL to the post featured image, or an image's alt attribute to the value of a Custom Field.
+Add -> WordPress -> Dynamic Data
Shortcuts to insert the most common dynamic data points are available at +Add -> WordPress -> Dynamic Data.
Available Dynamic Data Points
Available data points are dependent on the page element or property they are being linked to. For example, when setting an image URL, Featured Image, Author Pic, and User Pic will be available as data points, but when setting the value of a text element, these data points will not be available.
Data points shown in the Insert Dynamic Data dialog are as follows:
- Date (with various formatting options)
- Categories, Tags, & Taxonomies (with various formatting options)
- Custom Fields
- Comments Number (with various formatting options)
- Featured Image Title, Caption, Alt, and URL
- Author Display Name, Bio, Pic, and Custom Fields
- Current User Display Name, Bio, Pic and Custom Fields
- Site Title, Site Tagline, and other bloginfo()
- Archive Title & Description
PHP Function Return Value
To accommodate support for dynamic data points not shown in the Insert Dynamic Data dialog, use the PHP Function Return Value option.
Specify any PHP function that will return the data, such a custom function written in a plugin or a WordPress API function.
Arguments provided to this function should not contain quotation marks.
The value returned by this function will be inserted.