Using Custom Fields in Statuses


Videos are not designed to be a substitute for instructions. Please refer to the detailed Documentation below.

Custom fields can be added to any status update in WordPress to Buffer Pro, using the format {custom_field_NAME}, where NAME is the Post Meta key you want to get the value of for the Post that’s being sent to Buffer.

It’s hard to advise precisely what the precise tag will be, however we’ve documented some more common WordPress Plugin Custom Field keys below.

Advanced Custom Fields

You can access the value of an Advanced Custom Field by using its Field Name in your status messages.

Taking the below example, where we have a Field Name of test:WordPress to Buffer Pro: Custom Fields: ACF Field Configuration

You would use {custom_field_test} in your status messages, where the bold text denotes the Field Name in ACF above.
WordPress to Buffer Pro: Custom Fields: ACF Status Example

In your status message, custom_field_ must prefix the Field Name
Make sure you are using the Field Name.  The Field Label and programmatic Field Key will not work.

Custom Fields

You can access the value of a Meta or Custom Field by using its Meta Key in your status messages.

Taking the below example, where we have a Meta Key in a Post defined as test:WordPress to Buffer Pro: Custom Fields: Meta Configuration

You would use {custom_field_test} in your status messages, where the bold text denotes the Meta Key in the Custom Fields section of your Post above.
WordPress to Buffer Pro: Custom Fields: ACF Status Example

In your status message, custom_field_ must prefix the Meta Key

Yoast SEO / WordPress SEO

Setting Meta Key Custom Field
SEO Title _yoast_wpseo_title {custom_field__yoast_wpseo_title}
Meta description _yoast_wpseo_metadesc {custom_field__yoast_wpseo_metadesc}
Meta Robots Index _yoast_wpseo_meta-robots-noindex {custom_field__yoast_wpseo_meta-robots-noindex}
Meta Robots Follow _yoast_wpseo_meta-robots-nofollow {custom_field__yoast_wpseo_meta-robots-nofollow}
Meta Robots Advanced _yoast_wpseo_meta-robots-adv {custom_field__yoast_wpseo_meta-robots-adv}
Breadcrumbs Title _yoast_wpseo_bctitle {custom_field__yoast_wpseo_bctitle}
Canonical URL _yoast_wpseo_canonical {custom_field__yoast_wpseo_canonical}
Note the double underscore in the Custom Field column above.  This is require for Yoast SEO / WordPress SEO.

All in One SEO

Setting Meta Key Custom Field
SEO Title _aioseop_title {custom_field__aioseop_title}
Meta description _aioseop_description {custom_field__aioseop_description}
Note the double underscore in the Custom Field column above.  This is require for All In One SEO.

REST API

This section is intended for developers.  Specific programmatic steps must be taken to ensure correct working functionality of Custom Fields.

If you use a third party system, publishing software or a bespoke solution that can publish and update Posts to WordPress via the WordPress REST API, you can include Custom Fields in the meta parameter of your REST API requests.

It is not enough to simply send your Custom Fields / meta data; you must register the meta fields that you intend to use on your Posts, so that WordPress – and its various API’s – are aware of them.  In turn, this makes your Custom Fields available to you when creating, updating and reading Posts from the WP REST API:
https://codex.wordpress.org/Function_Reference/register_meta

For example, if you have a Custom Field called test that you will be using on your Posts, you would add the following code to your Theme’s functions file or your own Plugin:

register_meta( 'post', 'test', array(
    'show_in_rest'  => true,
    'description'   => __( 'Test' ),
    'single'        => true,
) );

Whilst WordPress does not require you to do so, it is good development practice to always register meta fields.

Adding Custom Fields to the Insert Tag Dropdown

If you have specific Custom Fields (whether ACF, Meta / Custom Fields, Yoast etc) which you use often, you can add them to the Insert Tag dropdown, to more easily insert Custom Field values into your status messages.

To manage Custom Tags:

  1. Navigate to WP to Buffer Pro > Settings in the WordPress Administration menu,
  2. Scroll down to the Custom Tags section.  For each Post Type, you have the option to add, edit or delete Custom Tags, which will then appear in the Insert Tag dropdown.
    WordPress to Buffer Pro: Settings: Custom Tags
  3. To add a Custom Tag, click the Add Custom Tag button.
    1. Custom Field Key: This is the ACF / Custom Field programmatic name
    2. Custom Field Label: This is the label to display on the Insert Tag dropdown for this Custom Field
      WordPress to Buffer Pro: Settings: Custom Tags: Add
  4. To edit an existing Custom Tag, change the Key / Label values as necessary
  5. To delete an existing Custom Tag, click the Delete link under the Actions column

When editing status messages, the Custom Tags for the given Post Type will then be displayed:
WordPress to Buffer Pro: Custom Tags: Insert Tags Dropdown