Since Pods 3.2, you have the ability to bind a custom field value to certain blocks in WordPress.
Custom Field binding
To do this, you’ll want to ensure you set up your Pods and fields accordingly:
- Pods Admin > Settings > Performance > Register meta fields > Enable
- Pods Admin > Edit Pods > Edit your pod > REST API > Enable
- Pods Admin > Edit Pods > Edit your pod > REST API > Show all fields (or edit the fields you want to make them available)
- Pods Admin > Edit Pods > Edit your pod > REST API > Field Location > Include in the meta object
There’s no ability to start linking a custom field from the UI in WordPress core as of WP 6.9.x — you must use the custom field metadata markup manually by editing your content as code through the editor.
<!-- wp:paragraph {
"metadata": {
"bindings": {
"content": {
"source": "core/post-meta",
"args": {
"key": "your_field_name"
}
}
}
}
} -->
<p></p>
<!-- /wp:paragraph -->
Custom Binding Source
Pods provides a custom binding source that unlocks much more than just custom fields for post types. You can now link the output of the Pods shortcode (which powers Pods Blocks).
It takes the same arguments that you would pass the shortcode. This allows you to embed a Field Value, a template for a Single Item, a template for a Item List, and other features that are supported by the shortcode.
The primary use-case for this binding source is to use it for embedding a field value.
<!-- wp:paragraph {
"metadata": {
"bindings": {
"content": {
"source": "pods/bindings-field",
"args": {
"name": "your_pod",
"id": "1234",
"field": "your_field_name"
}
}
}
}
} -->
<p></p>
<!-- /wp:paragraph -->
Access Rights
For all block binding integration within Pods, we use the corresponding Pod’s access rights to restrict when the value can be output and to whom.