WordPress Integration in Content Workflow

  • Updated

Connect WordPress to Content Workflow. This feature lets you link every field in your Content Workflow Templates with corresponding fields in WordPress. This is done by setting up a Template Mapping. Various WordPress fields, such as titles, body content, custom fields, tags, categories, Custom fields, advanced custom fields, featured images, and more, can be linked. You can transfer content from Content Workflow to WordPress, edit transferred content in WordPress, and import content from WordPress to Content Workflow.

How to enable this feature in your portal?

Contact your Customer Success Manager to enable this feature in your portal and learn about any associated costs.

Versions Supported

The integration supports WordPress 4.4 and at least PHP 7.0

Download the Plugin

Download the plugin from GitHub (1.0.0).

Install the Plugin in your WordPress Site

  1. Go to Plugins.

  2. Select Add new and upload the Content Workflow.zip file that was just downloaded.

Installation

Configure Plugin

Once you’ve installed and activated the plugin, you’ll see a Content Workflow link on the left sidebar in the WordPress admin. To begin using the plugin, you must configure the settings for the Content Workflow connection.

  1. Select the Content Workflow plugin from the WordPress admin sidebar

  2. Enter your Content Workflow account email address, your Content Workflow platform URL subdomain (account slug), and an API key you generate from Content Workflow. This information is case-sensitive. For more information on how to get your API key, check out our guide here.

  3. Save your changes. Once you have successfully authenticated, you will see a “Hello” welcome message at the top of the settings screen stating that you have successfully connected with your Content Workflow account.

What if my Website is Password-Protected?

When you enable HTTP authentication for your WordPress site, you must complete the HTTP Authentication Credentials section by adding the username and password details. This will allow the plugin to bypass the password and import content.

You can customize your template mapping once you’ve successfully entered your credentials.

Template Mappings

Template Mappings allow you to transfer content between Content Workflow Templates and WordPress. They specify how the fields in your templates should be brought into WordPress and are used for this content transfer. Each field type in a Content Workflow Template can be connected to various fields in WordPress, such as title, content, excerpt, post status, author, taxonomies, custom fields, images, and SEO settings. Additionally, Template Mappings lets you set the status of a content item in the workflow after it's imported, like changing it to "Published" in WordPress.

Tip: You can only push or pull content between Content Workflow and WordPress once a Template Mapping is created and at least one field has been mapped.

Set up a Template Mapping

  1. Select New Mapping in the Content Workflow menu.New Mapping Menu
  2. Select an account, project, and template to map.Picking template
  3. You must select an account, project, and template when creating a new mapping. While selecting the template, you will receive a sample of Items within that template and the template's description.
  4. Select Post Type and map fields.Picking the template mappings
  5. Once you've selected a template, you can create your first Template Mapping.
  6. Select your default Post Type for the mapping.
    • You can only save the mapping once the post type is selected and at least one field has been mapped.
  7. Once a post type is selected, you can map all your template fields.
  8. Navigate to the Content tab, located to the left of the mapping tab, to map the fields.
    • You will only see the field types you can map to in the mapping options.
    • Here are the mapping options for each Content Workflow field.Field mapping table
  9. Select Content Workflow Template tabs.Template tabs visual
  10. Select a tab to start mapping the Template fields.
  11. To learn more about the support for Content Workflow components and repeated fields.
  12. Select Save Mapping, and your Template Mapping is complete.
  13. The next step is to migrate your content from Content Workflow to WordPress using this Template Mapping.
    • You can set up additional actions as part of the mapping (see below).

(Optional) Map Content Workflow Status to WordPress Status 

Workflow mapping

Here, you can map each Content Workflow status to a WordPress status and, optionally, change the Content Workflow status when your Items are imported to WordPress.

Tip: You can map multiple Content Workflow text fields to a single WP field. However, fields must be mapped one-to-one to push your WordPress content back to Content Workflow.

(Advanced Custom Fields) Map Components and Repeatable Fields to Field Groups

Within the Advanced Custom Fields (ACF) plugin, you can create field groups, which can be mapped from components and repeatable fields. To map these, you must create a Repeater field type within ACF, which has the matching fields within the components.ACF Pro

Screenshot 2024-05-10 at 16.33.34.png

  1. Navigate to Template Mapping.
  2. Select the ACF Fields Groups option, the field group, the repeatable field, and the fields within that field group.Screenshot 2024-05-10 at 16.34.34.png
  3. To map a date in a text field in Content Workflow to an ACF date field, enter the date into Content Workflow in the format 'YYYY-MM-DD. This text field in Content Workflow must be plain text.

Migrate your Items from Content Workflow to WordPress

Importing items
  1. Navigate to Template Mapping in the plugin.
  2. Hover to the template you want to map and select Review Items for Import. You would like to map.Import step 1
  3. Select the items you wish to migrate into WordPress from the Import Items page by selecting Screenshot 2024-05-20 at 12.17.25 PM.pngon the left-hand side.
  4. You'll see the Content Workflow Item's name, last updated date, and Content Workflow status.
  5. Navigate, select the items you want to import and select Import Selected Items at the bottom of the table.Import step 3
  6. Your items will begin importing. This may take a couple of minutes.Import step 4
  7. Importing items is an asynchronous process, allowing you to start the import and navigate away from the page while it continues in the background until all items have been imported. If you import many items from Content Workflow, this could impact your site's performance. To minimize potential disruptions, it is recommended that the initial content pull be performed during low-traffic periods.

Review the Status of the Import

You can review the progress of your current import

  1. Navigate to the Template Mappings area of the Content Workflow plugin.
  2. Hover over the Template with Items being imported. Select Review Items for Import.Import step 5
  3. If you would like to review all of the items you imported from Content Workflow, you can do so through the Posts (Post or Page) section in your Dashboard.
  4.  Here, you can view and change the Content Workflow workflow status and sync all the post types with the latest content.

 

Update your Posts or Pages in WordPress with any Changes in the Content Workflow.

You can update posts or pages in WordPress in two ways: using the WordPress bulk edit tool or using the post editor.

Note: This is a "destructive operation," meaning any changes on the receiving side will be overwritten, so be sure someone else is not working on the content when you push or pull!

Pull Item updates using the WordPress bulk edit tool

  1. Navigate to the WordPress bulk edit tool.
  2. Select the Content Workflow Sync button.
  3. Select  Pulling your Items, which allows you to import the latest version from Content Workflow to update your Posts or Pages.

Bulk pull

Pull Item Updates from the post editor meta-box

Push and pull content updates from the post editor page meta-box. Pulling your Items lets you import the latest version from Content Workflow to update your Posts or Pages.

Pull on item

Import your Content from WordPress to Content Workflow

Pushing wordpress post to Content Workflow
  1. Create the mapping between the Content Workflow template and the Post Type. Follow the Steps here
  2. Select the Post Type and the content you want to import from WordPress.
  3. Select the bulk edit option > Content Workflow Sync.
  4. Select the content you want to push to Content Workflow and click Assign Template Mapping.
  5. Choose the account and template to associate with the WordPress content.
  6. Once you've done this, you can push all written content from WordPress, and the Items will be created in Content Workflow.
  7. You can also perform this action in WordPress at a Post or Page level.Push specific post to Content Workflow
    • If you haven't linked your WordPress content to a Template Mapping, you can do so through the meta-box on the post editor page.

Update your Items in Content Workflow with any Changes Made in WordPress.

You can update items from WordPress to Content Workflow in two ways: using the WordPress bulk edit tool or using the post editor.

This allows you to make changes from within WordPress and ensures that those changes can be synchronized with Content Workflow.

Note: This is a "destructive operation," meaning any changes on the receiving side will be overwritten, so be sure someone else is not working on the content when you push or pull!

 

Push Item Updates using the WordPress Bulk Edit Tool.

  1. Navigate to the WordPress bulk edit tool.
  2. Select the Content Workflow Sync button.
  3. Pushing your Items allows you to import the content into Content Workflow from WordPress to update your Items.
Pushing in bulk

Push Item Updates from the Post Editor Meta-Box

Push and pull content updates from the post editor page meta-box. Pushing your Items allows you to import content into Content Workflow from WordPress to update your Items.

Single item push

If you have not associated your WordPress content with a Template Mapping, this meta-box will allow you to do so. You can also push content from WordPress, which is not currently in Content Workflow.

Template flow

FAQ

What if my website is password-protected?

When you enable HTTP authentication for your WordPress site, you must complete the HTTP Authentication Credentials section by adding the username and password details. This will allow the plugin to bypass the password and import content.

Tip: If you're having issues connecting your HTTP auth credentials, try disabling password protection.

Changes made to a Content Workflow Item are not showing as updated in WordPress.

You may have made the changes recently, so the plugin may need a few minutes to sync. You can also press the 'refresh' button to manually sync Content Workflow and WordPress to pick up your changes.

Refresh wordpress

Can I update the status of a Content Workflow Item when importing it to WordPress?

Yes, you can. 

  1. From the Template Mappings screen of the plugin.
  2. Click Edit against the Template Mapping you want to update.
  3. Navigate to the Mapping Defaults tab.
  4. Here, you can map each Content Workflow status to a WordPress status and optionally change the Content Workflow status when your Items are imported to WordPress.

 

Workflow mapping

Is there metadata support?

The plugin has built-in support for mapping your Content Workflow fields to WordPress Custom Fields and Yoast SEO fields. Developers can also use many hooks and filters to hook up and map their meta fields.

Is hierarchy supported?

No, items are imported as a flat structure.

Is there Multisite support?

Content Workflow can work with Multisite. To do this, you’ll need to configure the settings on each site and perform the imports per site.

Does Content Workflow work with WPML?

Regarding translations, the integration generates a completely new post (page, custom post type, etc). You can create your WordPress content and translations and then push it to Content Workflow for management. However, no method is available to connect the translations during the initial Content Workflow import.

This implies that each WordPress post needs to have a one-to-one relationship with Content Workflow Items, meaning one Content Workflow Item per translation.

Does Content Workflow support inline images?

Not at the moment, but we have a workaround for supporting ‘Content Images’ mapping in Content Workflow. You must use shortcodes referencing the images saved in your attachment field. These will need to be placed where you want to paste your images.

Here are some example shortcodes you could include in your Content Workflow text editor:

[media-1 align=right linkto=attachment-page]

[media-2 size=medium]

[media-2]

The media number references the order in which the files have been uploaded to your Attachment field.

The shortcode syntax is: [media-$position align=left|right|center|none linkto=file|attachment-page size=thumbnail|medium|large|etc]
To explain:

Images are not syncing from WordPress to Content Workflow

Currently, it's not possible to import/sync images from WordPress to Content Workflow. We are working on this, so check out our product roadmap to stay up to date.

Images must be added to the items in Content Workflow and then mapped to the post in WordPress. This will then replace the current image (even if it's the same).

In the future, you'll be able to manage all your Content Operations in Content Workflow, as any image changes made there will automatically be reflected in WordPress when the item is moved to the published workflow status.

Does the integration support Gutenberg?

Unfortunately, the GC-WP integration isn't compatible with Gutenberg.
A workaround exists: Install WordPress Classic Editor and Gutenberg, which allows you to switch between them.
You can then import content from Content Workflow into a Classic Editor post, and the content will be imported as expected.

What are the reasons a push or pull of content can fail, and what are the error messages?

When pushing or pulling content between Content Workflow and WordPress, there may be times when the content needs to arrive in the end location successfully. This could be for several reasons, as listed below:

  • WordPress has made the most recent changes to the Item in Content Workflow.
    The error message will show as WordPress has the most recent changes for $item_name (Item ID:$item_id)

  • An error occurs when trying to map post IDs. This is only possible if you use the WordPress filters in the code.
    The error message will show as Cannot override post IDs

  • An error occurs if you try to map a Content Workflow field to the WordPress 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt' fields, but the value coming through from Content Workflow is not numeric OR a string.
    The error message will show as follows: The $field_type field requires a numeric timestamp or date string (where $field_type represents 'post_date,' 'post_date_gmt,' 'post_modified,' or' post_modified_gmt'). This must be plain text in Content Workflow, in the format YYYY-MM-DD.

  • An error occurs when mapping a post format to an incompatible post type. This is only possible if you use the WordPress filters in the code.
    The error message will show that the $post_type post-type does not support post-formats.

  • If WordPress fails to fetch an item from the Content Workflow API.
    The error message will show as Content Workflow could not get an Item for that item id: $item_id

  • An error occurs when pushing a WordPress item that is already the same version as that in Content Workflow.
    The error message will show as No update data found for that post ID: $post_id

  • An error occurs if there is an issue with the Content Workflow API when creating a new item.
    The error message will show as No item found or created for that post ID: $post_id

  • An error occurs when pushing a post from WordPress to Content Workflow if the Template Mapping has mappings set up for more than one Content Workflow tab. No error message is shown, but no content will be pushed to Content Workflow, so the item appears empty. To get around this issue, change the settings of the other tabs to 'Don't use' on the Template Mapping.

When importing content, it gets stuck at 25%.

Firewall issues can sometimes cause this. Check if you have any sort of firewall plugin enabled. You may have to add an exception for the Content Workflow plugin to your firewall.
Another thing to check is for any plugins blocking calls to WP-admin/admin-post.php. Deactivate them temporarily to see if this resolves the issue.

When importing content to our local development server (password protected), it gets stuck at 1%.

Due to how requests are made to the Content Workflow API, the plugin must be fixed when the site is password-protected. Try temporarily turning off your password for the import.

Can you export your mapping settings and import them from your local computer to your development server?

The WordPress import/export tool will work, as mappings are post-types. However, you will need to enter their GC connection credentials manually.

  1. Navigate to Tools > Export and select Template Mappings in the export radio options; it will export all your mappings. Then, you can re-import them on the other side (Tools > Import > WordPress Run Importer).

I'm having trouble importing a lot of items into WordPress.

Try importing in smaller batches of less than 200 items per migration.

Can you sync Content Workflow fields to taxonomies in WordPress?

Yes, you can. When creating the template mapping, select Taxonomy/Terms as the field type, and there you can choose from:

  • Categories
  • Tags
  • Post formats

If you're using a Content Workflow checkbox or radio button field for these values, ensure they match the name value of the corresponding category/tag in WordPress. If the names aren't identical, the values won't map correctly.

Can you map multiple Content Workflow fields to one WordPress field?

You can map multiple Content Workflow text fields to a single WordPress field.
However, fields must be mapped one-to-one to push your WordPress content back to Content Workflow.

Can you sync Content Workflow to multiple WordPress instances?

Yes, you can.

What is the Support page?

Under the Content Workflow menu item, you will see a Support page. This page contains a large text area filled with technical information about your server, browser, plugin, etc. This information is very useful when debugging, and the Content Workflow support team may ask you for it at some point.

Below the text box is a button that allows you to save all that information to a .txt file. This allows you to deliver it to anyone who needs it easily.

Support

Note: This information contains potentially sensitive data. Please be careful with where you post it. Do not post it in the WordPress support forums.

How can I edit an existing Template Mapping in WordPress?

Editing template mapping
  1. From the Template Mappings area of the Content Workflow-WordPress plugin, click 'Edit' against the Template Mapping you want to update.

 

Does the plugin work with ACF (Advanced Custom Fields)?

The Content Workflow WordPress plugin officially supports ACF (Advanced Custom Fields). We can guide you through ACF integration and mapping to fields within a Content Workflow template. Learn more here.

Does the plugin work with custom post types?

Yes, if you've already created your custom post type in WordPress, it will appear as an option to map to when you select the 'Post Type' on the Mapping Defaults tab of the Template Mapping.

Custom post types

Was this article helpful?

0 out of 0 found this helpful

We're sorry to hear that!

Find out more in our community

Have more questions? Find out more in our community