ACF Chat Fridays offer an incredible opportunity to meet with other users and the ACF development team. Each session answers your questions about the best way to build WordPress sites with ACF, and provides insight into new features coming to the plugin.
The September 1st session brought the focus to ACF Blocks, with Liam Gladdy of ACF looking at future improvements coming to ACF Blocks, before soliciting questions from the community on success stories, challenges, and suggestions for other users.
Co-hosted by Liam Gladdy, Iain Poulson, Anthony Burchell, and Damon Cook.
Highlights and selected questions from the session are available in the session summary. You can also watch the entire session in the player below.
Liam opened the session with an overview of improvements and fixes currently in development for ACF Blocks. Liam noted that WordPress blocks are changing, with a new admin that’s more React-based. Beginning with WordPress 6.3, the post editor is iframed, meaning ACF can’t load jQuery components. Liam discussed how the ACF development team is examining how to migrate to a more React-based viewpoint, making ACF Blocks more in line with the rest of the block editor experience.
During the session, Liam also discussed the upcoming release of ACF 6.3, intended to focus on ACF Blocks. He noted that the team is adding component support that will allow headless site builders to render headless components inside of ACF templates. A fix for block validation is also slated for ACF 6.3.
“I know it’s been a pain point for a lot of people. We’ve been waiting on Gutenberg to add some hooks,” Liam said during the session, noting that one of the needed hooks was recently merged, and the ACF team plans to contribute more.
ACF 6.3 will also allow saving a field from the block to the page meta, rather than to the block itself. This has been a highly-requested feature for some time.
The next session of ACF Chat Fridays takes place September 15th. Can’t wait? Reach out to us on Twitter.
ACF Chat Fridays is one of the best places for your questions and feedback on ACF. We’ve included some of the questions and answers from the latest session below, with minor edits made for clarity and style.
Q: As you move more towards a React-based experience, is the tentative plan to try to support backwards compatibility in a way that existing ACF blocks will “just work,” or would the existing ones become sort of “legacy”, and we’d need to rebuild in this new React-focused way?
Q: Do you have a rough estimate of when we’ll start seeing WordPress components on ACF Blocks?
A: It’s complicated, because we need to make sure we do it in a way that’s backward compatible. We’ll likely start on some of that after the release of ACF 6.3. There’s obviously some simple things that we can add relatively quickly, but there are complications when it comes to building out the back compat library so you can still use legacy HTML as well as the React side. We’re not sure how long it’s going to take at this point, but we’ll make sure that compatibility exists.
Q: Any chance we could get a hook to change the UI of pre-existing ACF field types? I’m thinking about how it’s presented in the editor.
A: ACF fields are rendered through render_field, which is on the component class itself. It’s possible to wrap that up and pass the complete HTML through to you before it’s rendered. You could do that now by overriding the class and overriding the method to wherever you wanted to output it. That’s probably the most reliable way, as doing it that way would apply it everywhere it’s used.
Q: I was wondering why you deprecated
acf_register_block_type() in favor of using
block.json instead. It seems silly to write it in JSON, then have PHP parse the JSON to get it back into PHP.
A: We should note that while the acf_register_block_type() function is deprecated, we have no intention of removing it. We do it that way largely because that’s what WordPress recommends. We’re trying to make sure ACF and ACF Blocks feel as much like WordPress as possible. Plus, using
block.json means you get all the new stuff from WordPress core blocks.
In addition, we’re planning to publish an official schema for using
block.json with ACF. That should make it easier to edit.
Q: Are there any plans to improve the admin-ajax.php response of the ACF Block fields markup (where it delivers the entire markup for a block when loading the first time) prior to the rewrite of going more React-native?
A: Absolutely. Once we’re in a component world, we can deliver that because we just store a local cache of every ACF field and its React component, and not have to worry about anything server side because it’s delivered globally into the block editor.
We share relevant resources during the call. We’ll sum them up here and try to provide a bit of context:
Join us on September 15th for the next session of ACF Chat Fridays. This session will take place at 2pm GMT.
What do you think we should cover in upcoming sessions? Let us know what you’d like to see on Twitter.
Sign up for the next session of ACF Chat Fridays here:
The list of upcoming sessions is below.