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 May 26th session featured a look at a new feature coming in ACF PRO 6.2: the ability to add options pages directly within the plugin’s UI.
Co-hosted by Iain Poulson, Matt Shaw, and Anthony Burchell.
Sign up for the next session →
You can watch the entire session in the player below, or read on for a selection of session highlights.
Matt Shaw got the session started with a demo previewing the new features coming to options pages in ACF 6.2.
Creating a new options page only requires three pieces of information: title, slug, and a parent page. Toggling on “Advanced Configuration” provides access to all of the settings offered by ACF’s option pages. For example, you can change the menu title and position, customize the labels for the update button and the updated message, add custom permissions, and change where the options pages are saved, and control autoload options.
Bringing options pages into the UI makes it much easier to add field groups. Once you’ve created the options page in the UI, it provides the option to add fields to the page you’ve just created, or link existing field groups.
Because you’re creating the options page in the ACF PRO UI, you can export the local.json
, allowing you to sync your options pages between different sites or put them in version control. You can also export them to PHP if you want to get them out of the UI.
The session also included a discussion of other new features currently in development. A future release of ACF will see a way to activate bidirectional relationships from within the UI when creating a Relationship field. Saving a relationship from one post object to another will automatically it on the other object, creating the relationship in both directions.
We’re also improving the UI for taxonomy-based conditional logic. For example, say you’re using a taxonomy or field, and you want to include conditional logic that shows another field based on the value that’s selected for the taxonomy. Currently, you can’t do that very easily in the UI, as you have to know the term ID that you want to target for the taxonomy. A future version of ACF will include an update to the conditional logic section of the field group editor that gives you a dropdown with the available categories. For example, if you’re selecting from “Users”, you’ll get a dropdown of the users, rather than having to guess at their IDs.
Last but not least, a future release will offer multiple json
paths. Currently, ACF’s local JSON feature will load and save your field group, post type, and taxonomy definitions in a file for version control. However, that JSON is only loaded from one location and doesn’t allow for it to be saved in multiple locations.
For example, say you have a plugin that adds a field group your content editors need. The plugin has the JSON for the field group definition, but it’s not easy to tell ACF that it needs to pick up not only the JSON from the theme, but from the plugin as well. We’re adding support for filtering the paths for where the JSON files are acquired from and saved back to.
ACF Chat Fridays is going on a short hiatus for the next few weeks, but we’ll be back with our next session on June 23rd. As always, please feel free to reach out to us on Twitter.
You can also connect with Iain or Liam at WordCamp Europe, taking place June 8 to 10 in Athens, Greece. General admission tickets for WordCamp Europe were still available at the time of publication.
.
Every ACF Chat Friday gives you the opportunity to ask the ACF team questions about technical challenges and the best way to achieve a specific objective. We’ve included just a few of the questions and answers below. Minor edits have been made for clarity and style.
Q: Is there any way to save ACF option pages more efficiently? Right now, it creates a lot of individual MySQL queries when you get them, even if you put them in something like a group field. No matter how you structure them, it doesn’t seem like there’s a singular query to get them out.
A: Turning on the autoload option might solve this. Essentially, autoload means that WordPress goes and grabs all of the options that are sent and puts them into memory. Currently, you’ll need to add some code to the options page to turn on autoload:
$option_page = acf_add_options_page( array(
'page_title' => __( 'Theme General Settings '),
'autoload' => true,
));
Starting in ACF PRO 6.2, the UI panel for options pages will expose every argument that could be passed to that function. This will help shine a light on features that may have gone missed, such as autoload.
Q: Have you been exploring a Block Editor field? I’m thinking of something similar to the Wysiwyg Editor field, but for blocks.
A: We are currently looking at ways to achieve this. In the meantime, you might want to take a look at the Block Editor field offered in ACF Extended.
The next session of ACF Chat Fridays is scheduled for June 23rd, 2023, at 2pm GMT.
We share relevant resources during the call. We’ll sum them up here and try to provide a bit of context:
Join us on June 23rd 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:
https://wpeng.in/acf-chat-fridays/
The list of upcoming sessions is below.
Tag or DM us on Twitter to let us know you’ll be there. Suggest new topics, let us know what you’d like to see, and send us feedback with #ACFChatFridays on Twitter.
Speed up your workflow and unlock features to better develop websites using ACF Blocks and Options Pages, with the Flexible Content, Repeater, Clone, Gallery Fields & More.
Mike is the Senior Editor of Delicious Brains. Based in Hamilton, Ontario, he has an extensive background in business-to-business communications and marketing. His hobbies include reading, writing, and wrangling his four children.
For plugin support, please contact our support team directly, as comments aren't actively monitored.
Sign up for the latest Advanced Custom Fields news, updates, and developer tutorials
© 2024 WPEngine, Inc. All rights reserved.
1WP Engine is a proud member and supporter of the community of WordPress® users. The WordPress® trademarks are the intellectual property of the WordPress Foundation, and the Woo® and WooCommerce® trademarks are the intellectual property of WooCommerce, Inc. Uses of the WordPress®, Woo®, and WooCommerce® names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation or WooCommerce, Inc. WP Engine is not endorsed or owned by, or affiliated with, the WordPress Foundation or WooCommerce, Inc.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.