Meta Field Block

Beskrivning

The plugin allows developers/users to display a meta field as a block on the frontend, supporting ACF fields. It can be nested inside a parent block that has ’postId’, ’postType’ context such as ’Query Block’ or stand-alone.

If this plugin is useful for you, please do a quick review and rate it on WordPress.org to help it spread to more people. I would very much appreciate it.

Please check out my other plugins if you’re interested:

  • Content Blocks Builder – A tool to create blocks, patterns or variations easily for your site directly on the Block Editor.
  • Block Enhancements – A plugin to add more useful features to blocks likes: icon, box-shadow, transform…
  • Icon separator – A tiny block just like the core/separator block but with the ability to add an icon to it.
  • SVG Block – A block to insert inline SVG images easily and safely. It also bundles with more than 3000 icons and some common non-rectangular dividers.

The plugin is developed using @wordpress/create-block.

Skärmdumpar

  • Block's settings

Block

Detta tillägg tillhandahåller 1 block.

  • Meta Field Block Display a meta field as a block on frontend, supporting ACF fields.

Installation

  1. Upload the plugin files to the /wp-content/plugins/meta-field-block directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ’Plugins’ screen in WordPress

Vanliga frågor

Who needs this plugin?

This plugin is created for developers, but end users can also use it.

Does it support inputting and saving meta value?

No, It does not. It only displays meta fields as blocks.

Does it support all types of meta fields?

Only simple types such as string, integer, or number can be used directly. Other complex types such as object, array need to be converted to HTML markup strings.

Does it support all types of ACF fields?

All basic field types that can be retrieved value by the get_field or the_field functions. Some complex field types like image, link, page_link, post_object, relationship, and taxonomy are also supported.

Does it include some style for the meta field?

The block does not provide any CSS style for the meta field value. But it does provide a basic display inline style from the settings.

Does it support other meta field frameworks?

Yes, it does as long as those meta fields can be accessed value via REST API.

Recensioner

4 juli 2022
This plugin was recommended in a meta box forum, it works amazingly well. It does one thing and does it well. I understand it's still in the early stages, but I hope in the future there is support for some core blocks like heading & paragraph so we can add dynamic texts inline. Another thing I am hoping to see in future us ability to format output.
29 maj 2022
This is a wonderful plugin. Simple and effective. I needed some help from the author on how to use it in a single page setup (for a custom post type blog), and the author was amazing, helpful and quick.
26 maj 2022
After banging my head trying to get shortcodes to work inside of query loop, this was such a great find. Why this is not a core function is beyond me, but I am so happy to have found this plugin.
23 maj 2022
This is just another plugin, which shouldn't be needed, as this should be just a feature out-of-the-box 😉 Thank you a lot for the work.
16 maj 2022
Hey! Phi Phan. You are a legend. This is the perfect plugin. Simple. Works reliably. Does enough and not too much. Truly, I've spent HOURS trying to solve a simple problem of getting my custom fields to display. I've created my own custom blocks and shortcodes and... this is the plugin I've desperately been wanting to find. Thank you. I've used it with custom fields from MetaBox.io and just plain post meta on registered custom post types. So far it's working great. Since it doesn't render the meta whilst editing, sometimes it's hard to find where the block is. I actually just added custom CSS just to outline it so I can find it. Overall, fantastic plugin. Great work!
25 mars 2022
Good plugin idea. Hope to see the plugin grow. Thanks for making this plugin a reality.
Läs alla 6 betyg

Bidragsgivare och utvecklare

”Meta Field Block” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer

Översätt ”Meta Field Block” till ditt språk.

Intresserad av programutveckling?

Läs programkoden, kika på SVN-filförvaret eller prenumerera på utvecklarloggen via RSS.

Ändringslogg

1.0.6

Release Date – 25 Jun 2022

  • DEV – Add an option to show the block’s outline on the Editor

1.0.5

Release Date – 21 Jun 2022

  • DEV – Display the placeholder text on the template context

1.0.4

Release Date – 02 May 2022

  • DEV – Support displaying some field types for ACF such as image, link, page_link, post_object, relationship, taxonomy

1.0.3

Release Date – 30 April 2022

  • DEV – Add supports for borders, and full typography options

1.0.2

Release Date – 28 April 2022

  • DEV – Add the title to block registration in JS
  • REFACTOR source code

1.0.1

Release Date – 23 March 2022

  • FIX – The block does not work in the site editor.

1.0.0

Release Date – 22 February 2022