Advanced Custom Fields version 6.2 is now available! 🚀🎉
ACF 6.2 introduces the ability to create options pages right from the plugin admin UI in ACF PRO, as well as bring bidirectional relationship functionality natively to the plugin.
This release also brings enhanced support for registering multiple locations for JSON files, and a whole lot of improvements and fixes.
We have also increased the minimum requirements for PHP and WordPress in this release.
This has been a big effort from all involved. Thanks to all those that tested out the beta and release candidate releases we’ve put out over the last few weeks.
👨💻 Please find the release notes below. For the latest ACF news, follow us on Twitter @wp_acf.
Let’s get into it.
The Options Pages feature is a powerful piece of functionality in ACF PRO that allows developers to register global, site-wide fields and place them on new pages in the WordPress admin.
Up until now, you would have to register a new options page using a code snippet. It could be frustrating to start creating the field group for the options page, find you needed to save the field group, go to your code editor to register the page, then reload the field group editor to select the options page in the location rules.
In a similar way that we introduced a UI for registering custom post types and taxonomies in ACF 6.1, we’ve brought the same treatment for Options Pages to ACF PRO 6.2, making it easier to create settings pages and child pages with just a few clicks, with access to all the configuration settings in the UI:
As part of this work, options page definitions are supported as ACF JSON files, allowing them to be imported and exported via JSON, as well as support for JSON sync. They can also be exported to PHP from the ‘Tools’ page.
One of my favorite aspects of this new functionality is the ability to create an options page right from the field group editor when defining the location rule for the field group. Check it out in Damon’s walkthrough video:
Of course, not all ACF PRO users will want to register options pages in the UI. We’ve documented how to disable this from the plugin admin here.
ACF has a number of field types that give you the ability to create relationships between data objects (post types, users, taxonomies). These are the Relationship, Post Object, User, and Taxonomy fields types. Out of the box, these fields create a one directional connection between the data objects.
For example, using a Relationship field to select other posts when editing is a common way to curate a ‘Related Posts’ section on a site. The post IDs of the posts selected are stored in the field meta for the post being edited. The connection is one way, in that the selected posts don’t know they have been connected to the original post. For some use cases this is just fine, but for other situations having the connection data stored both ways – therefore bidirectional – is needed. Previously, this was only possible with a code snippet or by using a third-party plugin.
In 6.2, this is now native in the ACF UI. We have introduced an ‘Advanced’ settings tab for the four relational field types, where a new ‘Bidirectional’ toggle allows you to turn on bidirectional mode and set the field to store the connection data on the other side of the relationship.
This isn’t the easiest feature to understand, unless you’ve needed to create bidirectional relationships in the past and had to use another method. So Liam has put together some helpful videos to explain how to use it.
Here’s an example of setting up a simple ‘Related Products’ relationship for a (sadly fictional) ecommerce store:
Here is another example, this time showing a relationship between different object types: a custom post type and user:
Check out our documentation on how to set up and use bidirectional relationships on fields.
This is an all-round big release, with the larger features already mentioned and some other improvements. Let’s take a look at some of the most impactful improvements.
The Local JSON feature has been a popular one since it was released back in ACF v5, giving you the ability to to load field group definitions from JSON files instead of the database, making it easier to version control changes and collaborate with other developers. It also supports options pages, custom post type, and taxonomy definitions!
By default, the JSON files are saved and loaded from an
acf-json directory in the theme. Prior to ACF 6.2, it was also possible to change the load/save path and load JSON from multiple different directories. However, it wasn’t possible to save the JSON files to multiple directories, making it much harder to save the files back to the location they were loaded from.
In 6.2, we’ve added new filters to accomplish this. Check out our documentation to see how.
Registering custom post types and taxonomies right from the ACF admin UI has proved to be a time saving feature for many developers, allowing them to more easily create the data structures for their sites.
However, for sites that contain lots of similar post types or taxonomies, being able to duplicate existing ones was a much needed but missing feature. We’ve changed that in 6.2, making it possible to duplicate a post type or taxonomy from the list table screen as well as from the notice that shows after saving a post type. When you duplicate a post type or taxonomy, it will take you into the creation screen, with all the values apart from the name prefilled from the object you are duplicating.
These are just the highlights, with more improvements and bug fixes bundled in this release. To see a full list of all the updates, take a look at the changelog.
WordPress core recently announced that they are dropping support for PHP 5 as of WordPress 6.3, which makes a lot of sense. PHP 5 was end-of-life at the end of 2018! As a plugin with a large user base, the team feels that we have a responsibility to assist in getting users to keep PHP and WordPress versions updated to the latest version as possible.
TL,DR; As of ACF and ACF PRO 6.2, we have raised the minimum required PHP version to 7.0 and the minimum required WordPress version to 5.8.
The ACF plugin has had a minimum PHP requirement of PHP 5.6 for a long time, so we have decided to match WordPress – PHP 7.0.
While we analyzed the impact of raising the minimum PHP version, we also investigated raising our minimum supported WordPress version requirement. This has been sitting at WordPress 4.7 for a long time. WordPress 4.7 was released in December 2016!
In contrast, WordPress 5.8 was released in September 2021. With ACF Blocks better tracking WordPress block development since ACF 6.0’s new generation of ACF Blocks, it made sense to raise it. We also found a large number of installs using ACF PRO on WordPress 4 hadn’t updated ACF in a long time.
Going forward, we’re planning some significant improvements and upgrades to ACF Blocks. These features will require more modern versions of WordPress with newer block editor features too. We already require WordPress 5.8 for ACF Blocks v2, and this will bring the rest of the plugin in line with that.
If you are running ACF on a site that doesn’t meet these new requirements, WordPress won’t let you update to ACF 6.2 if your PHP version is lower than 7.0, and will show a warning message if your WordPress version is lower than 5.8.
We are always open to hear your thoughts about the plugin and any feature requests you might have. However, in the past there hasn’t been a central way to make your thoughts heard. We’ve had people suggest feature requests in support, on the forums, over Twitter and even in person. As you can imagine, that doesn’t make it easy to keep on top of them all, and our users don’t have any insight into what others are asking for.
Thanks to the larger product team at WP Engine, we now have a public feedback board powered by Canny.io where you can post feature requests, improvement suggestions, as well as vote and comment on posts from other users.
Check out the board here – advancedcustomfields.com/feedback/
We’ve also added a link to it in the footer of the ACF plugin pages, along with handy links to our support, changelog, and documentation pages:
So go forth and request features, post suggestions, and help us make the plugin even better. 🙌
We’ve got a packed backlog with new features, improvements, and bug fixes to keep us busy over the next few months. For ACF 6.3 we’ll be focusing on improvements to the ACF Blocks functionality in ACF PRO, including block field validation, saving block data in post meta, and improving our UI to make it closer to the native block editor.
Keep up to date with what we’re working on in our bi-weekly ACF Chat Fridays office hours.
Thanks to everyone in the ACF community who helped make this release possible! 🙌
Are you excited about the new features and improvements in ACF 6.2? Let us know in the comments below or on Twitter.