ACF Blocks

18 Jun

Compiling Multiple ACF Blocks With Scripts

Introduction The WordPress block editor has revolutionized the way we can create content in WordPress. Whether you’re developing a custom ACF Block, a theme, or a plugin, effective tooling can help make your development workflows fast... Continue Reading

22 May

Disable Field Validation in ACF Blocks

Field validation is enabled by default for all ACF Blocks. Existing posts with ACF Blocks are validated the next time the post is edited. If any fields fail validation, the post cannot be saved until those issues are resolved. In some cases... Continue Reading

22 May

Save ACF Block Field Values to Post Meta

By default, WordPress stores a block’s field data inside the block’s HTML comment in post_content. This is usually fine, but you may also want to create an ACF Block that saves and reads its data from post meta instead, thus making it e... Continue Reading

22 May

ACF Blocks Configuration via block.json

Description Since ACF 6.0, ACF has recommended using block.json to handle your block registration. A mirror of the WordPress JSON Schema for block.json, with ACF’s additions, is available at https://github.com/AdvancedCustomFields/schemas... Continue Reading

24 Jan

Using Context With ACF Blocks

ACF Blocks opens the door to more creative building possibilities. One example we previously explored was using InnerBlocks and parent/child relationships, where we nested ACF Blocks inside of each other. Nesting your ACF Blocks organizes y... Continue Reading

24 Jan

Extending ACF Blocks With Block Supports

Overview The WordPress Block Supports API offers plenty of features to extend your ACF Blocks. Additional attributes are passed to your block when you opt in to these features. Often, these features enable different parts of the block edito... Continue Reading

4 Dec

ACF Blocks: How to Use Block Locking

Locking down your ACF Blocks with block locking ensures those blocks can’t be removed or modified in unauthorized ways. You can think of block locking as a safety mechanism, whether you’re using it on a client’s WordPress site or one ... Continue Reading

11 Oct

ACF Blocks: Using InnerBlocks and Parent/Child Relationships

In this tutorial, we’ll show you how to utilize the InnerBlocks component within an ACF Block. We’ll also demonstrate how you can leverage relationships to nest blocks while limiting their discoverability. By the end of the tuto... Continue Reading

28 Sep

ACF Blocks: Using get_block_wrapper_attributes()

The get_block_wrapper_attributes() function allows you to use the styles built by WordPress’ native supports for a block, such as background and text colors, padding, margin, etc. In the block editor, this is automatically output for ... Continue Reading

17 Aug

ACF Blocks FAQ

Frequently Asked Questions Have a question about ACF Blocks that isn’t covered here? Then make sure to register for the next session of ACF Chat Fridays, or reach out on Twitter. Continue Reading