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?
Reach out to your Customer Success Contact 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
-
Go to Plugins.
-
Select Add new and upload the Content Workflow.zip file that was just downloaded.
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.
-
Select the Content Workflow plugin from the WordPress admin sidebar
-
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.
-
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
- Select New Mapping in the Content Workflow menu.
- Select an account, project, and template to map.
- 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.
- Select Post Type and map fields.
- Once you've selected a template, you can create your first Template Mapping.
- 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.
- Once a post type is selected, you can map all your template fields.
- 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.
- Select Content Workflow Template tabs.
- Select a tab to start mapping the Template fields.
- To learn more about the support for Content Workflow components and repeated fields.
- Select Save Mapping, and your Template Mapping is complete.
- 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
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.
- Navigate to Template Mapping.
- Select the ACF Fields Groups option, the field group, the repeatable field, and the fields within that field group.
- 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
- Navigate to Template Mapping in the plugin.
- Hover to the template you want to map and select Review Items for Import. You would like to map.
- Select the items you wish to migrate into WordPress from the Import Items page by selecting on the left-hand side.
- You'll see the Content Workflow Item's name, last updated date, and Content Workflow status.
- Navigate, select the items you want to import and select Import Selected Items at the bottom of the table.
- Your items will begin importing. This may take a couple of minutes.
- 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
- Navigate to the Template Mappings area of the Content Workflow plugin.
- Hover over the Template with Items being imported. Select Review Items for Import.
- 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.
- 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
- Navigate to the WordPress bulk edit tool.
- Select the Content Workflow Sync button.
- Select Pulling your Items, which allows you to import the latest version from Content Workflow to update your Posts or Pages.
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.
Import your Content from WordPress to Content Workflow
- Create the mapping between the Content Workflow template and the Post Type. Follow the Steps here.
- Select the Post Type and the content you want to import from WordPress.
- Select the bulk edit option > Content Workflow Sync.
- Select the content you want to push to Content Workflow and click Assign Template Mapping.
- Choose the account and template to associate with the WordPress content.
- Once you've done this, you can push all written content from WordPress, and the Items will be created in Content Workflow.
- You can also perform this action in WordPress at a Post or Page level.
- 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.
- Navigate to the WordPress bulk edit tool.
- Select the Content Workflow Sync button.
- Pushing your Items allows you to import the content into Content Workflow from WordPress to update your Items.
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.
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.
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.
Can I update the status of a Content Workflow Item when importing it to WordPress?
Yes, you can.
- From the Template Mappings screen of the plugin.
- Click Edit against the Template Mapping you want to update.
- Navigate to the Mapping Defaults tab.
- 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.
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:
-
The minimum required is [media-$position], where $position is the number of the image.
-
Align defaults to nothing, so the default image output. See here: https://codex.wordpress.org/Inserting_Images_into_Posts_and_Pages#Image_Alignment
-
link to defaults to no media link. You can wrap your shortcode in a link if you want to link externally, e.g., <a href="google.com">[media-1]</a>. The other options are “file,” which links to the full image file, and “attachment page,” a WordPress-specific attachment page. See here: https://codex.wordpress.org/Inserting_Images_into_Posts_and_Pages#Image_Link
-
size defaults to “full,” which means the uncompressed, non-cropped version of the image, but you can use any registered media size, including the default WordPress sizes. See: https://codex.wordpress.org/Inserting_Images_into_Posts_and_Pages#Image_Size. However, you’re not limited to the WordPress default sizes. If you know the other registered sizes, you can use those. See: https://developer.wordpress.org/reference/functions/add_image_size/
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.
- 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.
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?
- 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.
Updated