Skip to main content

Integration method - Iframe

This will embed the forum threads under WordPress posts. This option requires Article and Forum Connect Plus.

Configuring

No additional configuration is usually required when using the iframe integration method.

Depending on whether the forum and blog are on different domains, or other security settings that are set up for the forum to stop it being embedded on other websites, additional configuration may be required to allow the forum to be embedded in an iframe, such as an exemption to an x-frame-options header or a CSP (Content Security Policy). If the iframe is failing to load, check the browser developer console for any errors.

There is also the option to specify a style to use when the iframe is embedded. By default, the embedded thread will use the same style the user would normally see when browsing the forum, i.e. either the forum default style, or the style they have selected when logged in. You can force a particular style to always be used in the iframe embed by going to ACP > Setup > Options > [Aud] Article and Forum Connect, and entering the ID of the style you wish to force.

Creating an API key

In the XenForo ACP, go to Setup > API Keys > Add API key. Enter a title, select “Guest key” as the type, and select the following scopes: node:read, thread:read. Make sure the API key is set to active, and then save.

Go back to Settings > Article and Forum Connect: XenForo and WP in WordPress, and enter the API you just created in XenForo to the “XenForo API key” field.

You will also need to create API keys for each user you wish to create threads as.

For each user, in the XenForo ACP, go to Setup > API Keys > Add API key. Enter a title, select “User key” as the type, search for the user to create the API key for, and select the following scopes: thread:write. Make sure the API key is set to active, and then save.

In WordPress, go to Users, find the user, and enter the API key into the XF API key field. This will then be used to create threads on behalf of the XF user the API key is linked to.