Custom fields allow you to extend the default functionality offered by StoryChief.
Check out this in-depth article on how and why to use custom fields.
When using external custom fields, you'll need to map these over to your WordPress blog as well. There are 2 ways of doing this.
Table of Contents
Start using custom fields
1. Basic mapping with ACF
If you are using the Advanced Custom Fields (ACF) plugin on a WordPress website, you can connect your custom fields to ones in your StoryChief account.
Step 1. Make sure that you already have ACF installed. Now download, install, and activate the StoryChief ACF plugin on your WordPress site.
Step 2. In the admin site of WordPress, go to Settings β StoryChief ACF.
Step 3. Now you can link custom fields to ones in WordPress. Click on "Save changes".
π Note: If you don't see any available fields here, visit your WordPress channel page in StoryChief and click on edit for your website. This allows the new custom field(s) to be sent to WordPress, you don't need to change anything.
Done π Your custom fields will now be mapped when publishing to WordPress.
2. Extended mapping with WordPress actions.
Using the available plugin actions and filters you can extend the way our plugin behaves. Below are some examples of how to map the fields. A complete overview of the available hooks and filters can be found here.
A boilerplate and example can be found on our WordPress Mapping Starter kit repository on GitHub.
Step 1. Go to StoryChief -> Settings -> Settings -> Custom fields π Quick link
Step 2. Either create the custom field to get the 'Field API key' or copy the key below the field title. Use this key in the plugin where 'INSERT STORYCHIEF FIELD KEY' is listed.
Step 3. Go to WordPress -> ACF -> Field groups to find the name/key of the custom field. E.g. my_custom_field_name.
Step 4. Paste the WordPress field name in the plugin where 'INSERT ACF FIELD NAME' is listed.
function storyChiefSetCustomField($payload)
{
$STORYCHIEF_FIELD_KEY = 'INSERT STORYCHIEF FIELD KEY';
$ACF_FIELD_NAME = 'INSERT ACF FIELD NAME';
...