- Contributors: bobbingwide
- Tags: block
- Requires at least: 6.6.0
- Tested up to: 6.7.0
- Stable tag: 0.1.0
- Requires PHP: 8.2.0
- License: GPL 3.0
- License URI: https://www.gnu.org/licenses/gpl-2.0.html
Displays a post metadata field in a block.
The Field block ( oiksb/sb-field-block ) displays post meta data for your post types. Use it replace [bw_fields] and [bw_field] shortcodes in your content or block based themes.
The field block supports all fields which have been registered to WordPress using register_post_meta().
This includes fields defined using oik-fields as virtual fields.
For a field to be rendered inside the block editor the post type must be registered to show_in_rest
and support custom-fields
.
- Upload the contents of the sb-field-block plugin to the `/wp-content/plugins/sb-field-block' directory
- Activate the sb-field-block plugin through the 'Plugins' menu in WordPress
- Note: sb-field-block is dependent upon the oik-fields and the oik base plugin.
tbc
tbc
For examples see the latest development in the oik-events plugin. The plugin was prototyped with the oik-plugins plugin.
The block displays fields which have been registered using functionality provided by oik and oik-fields.
The plugin has been tested to display fields registered with the following types.
- text
- URL
- virtual
- noderef
- sctext
- select
- numeric
- textarea
- date
- time
No. Consider using Field block for ACF Pro or Meta Field Block
Don't know. I've not yet tried it.
- sb-field-block in the block editor
- sb-field-block on the front end
- Field block settings
Use this plugin to replace the [bw_fields] and/or [bw_field] shortcodes in your post content or block based themes.
- Changed: Remove tracing from sb_field_block_dynamic_block() #8
- Changed: Improve handling for showLabel toggle #7
- Added: Update supports, incl. several experimental options #10
- Changed: Update build #9
- Changed: Add postType label to the REST response #9
- Changed: Continue to support style and editorStyle files, but comment out all of the debug styling #3
- Changed: Obtain post type label from the oiksb/fields store #9
- Changed: Default field name to the first field for the post type #9
- Changed: Default the postType value from context. Reset fieldName to undefined on postType change #9
- Fixed: Correct relative file name for editorStyle #3
- Changed: Update build #7 #8
- Added: Implement QAD prototype solution for showLabel attribute #7
- Changed: Pass the postId from context as urlQueryArgs post_id #8
- Changed: Handle context, passing it to DisplayMetaControl for server side rendering #8
- Changed: Add usesContext: to enable correct post_id to be passed on ServerSideRender #8
- Changed: Add Show Label toggle #7
- Changed: Add $content and $block params to sb_field_block_dynamic_block() #8
- Tested: With WordPress 6.7 and WordPress Multisite
- Tested: With Gutenberg 19.6.2
- Tested: With PHP 8.3
- Changed: Reinstated for use by oik-events #6
- Tested: With WordPress 6.7 and WordPress Multisite
- Tested: With Gutenberg 19.6.2
- Tested: With PHP 8.3
- Added: Originally developed Mar-June 2021
If you want to read more about the oik plugins then please visit the