Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI ReferenceChangelog
Dev GuideAPI ReferenceChangelogUser GuideDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

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 under core must be mapped with ACF Field 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 fieldStructured content field
TextText
Text AreaRich Text
NumberNumber
Date Picker/Time PickerDate & Time
True/FalseBoolean
EmailText (with validation)
URLURL
ImageAsset
FileAsset
WYSIWYG EditorRich Text
oEmbedURL
SelectChoice
CheckboxChoice
Radio ButtonChoice
Post ObjectWordPress Taxonomy
TaxonomyWordPress Taxonomy
UserWordPress Taxonomy
RepeaterReference

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