Map structured content to WordPress ACF
How to map structured content to WordPress Advanced Custom Fields (ACF) in Optimizely Content Marketing Platform (CMP).
Optimizely Content Marketing Platform (CMP) supports publishing to WordPress using structured content. You can map Advanced Custom Fields (ACF) to structured content fields.
Currently, WordPress ACF publishing only supports structured content created with the CMP Open API. The Open API adds additional meta information, which is essential to support publishing and previewing structured content.
Definitions
- CMP structured content – A system designed to store content structure and the content itself. It operates similarly to a headless CMS but offers more flexibility for general data storage. CMP lets you deliver content through your preferred medium without dictating the final delivery method. CMP has the following fields:
- Text
- Number
- Date and time
- Asset
- Reference
- Choice
- Rich text
- URL
- Boolean
- WordPress taxonomy
- JSON editor
- WordPress ACF – A plugin that lets you add custom fields to posts, pages, and custom content types. This makes creating and managing complex, flexible content structures easier without coding. See ACF Field Types to see what fields are avaliable.
- key – The
key
attributes undercore
must be mapped with ACFField Name
. - source_metadata – The data to determine if the field is an ACF field or WordPress REST attribute field.
If it is an ACF field, add"source_metadata": "{\"is_custom_post_type_field\": true}"
. For other fields, you can add"source_metadata": "{\"is_custom_post_type_field\": false}"
, although it is not required. - editorGuid – Contact Optimizely Support to get your
editorGuid
. - integrationInstanceId – Contact Optimizely Support to get your
integrationInstanceId
.
Supported fields for ACF integration
CMP supports the following fields:
ACF field | Structured content field |
---|---|
Text | Text |
Text Area | Rich Text |
Number | Number |
Date Picker/Time Picker | Date & Time |
True/False | Boolean |
Text (with validation) | |
URL | URL |
Image | Asset |
File | Asset |
WYSIWYG Editor | Rich Text |
oEmbed | URL |
Select | Choice |
Checkbox | Choice |
Radio Button | Choice |
Post Object | WordPress Taxonomy |
Taxonomy | WordPress Taxonomy |
User | WordPress Taxonomy |
Repeater | Reference |
Unsupported fields
Fields not currently supported for WordPress v2 include the following:
- Relationship
- Accordion
- Flexible Content
- Link
- Tab
- Password
- Color Picker
- Group
- Range
- Gallery
- Button Group
- Page Link
- Google Map
- Message
- Clone
Updated about 1 hour ago