On Apr 3, 2023, Advanced Custom Fields (ACF) released one of its most groundbreaking updates since the introduction of Gutenberg ACF blocks. This 6.1 plugin release includes one truly significant feature: the ability to create custom post types.
This new feature is particularly timely, as it allows for greater customization directly from the administrative area of WordPress. Adding custom post types with “no-code” isn’t a new paradigm — but it is new for ACF. Given that ACF already excels at consistently implementing fields, blocks, and many other features, we’re excited to see the introduction of custom post types in ACF.
A Brief History of ACF
ACF was created March 28, 2011 by Elliot Condron as an easier way to implement custom fields. And from the earliest dawn of the 1.0 plugin, ACF was a clear advancement over add_meta_box.
Twelve years later, ACF has indeed proven its value, with over 2 million installations and counting. Features such as automatic field validation, a friendly UI in the admin panel, and powerful repeater and flex content fields make ACF a clear winner in the custom fields space.
After ten years of growth under Condron’s watchful eye, in 2021 ACF was sold to Delicious Brains, a significant player in the plugin community. Just over a year later, Delicious Brains – and thus ACF – was acquired by WP Engine. This acquisition was a shift for the WordPress community, but it also ensures that ACF remains in very capable hands.
Alternatives to ACF CPT
Naturally, there are some alternatives to custom post types in ACF. After all, we’ve been making CPTs for ages. Among those options:
- CPT UI
- Good old handwritten register_post_type (note that this method is manual and time-consuming)
Why We’re Excited for ACF CPT
In particular, there are a couple of ACF CPT features we’re anticipating in WP Engine:
- ACF custom post types built into the ACF user interface we already know and love.
- Custom post types will be available in both the free and pro versions. The developers could have easily locked this feature behind the premium paywall, knowing that many people would be willing to pony up for it. However, we applaud WP Engine for being kind enough to release it in the free version.
- CPTs are synced with standard ACF JSON or PHP exports. Easy to synchronize and it keeps your CPTs out of the database.
- ACF has a tool to help users migrate away from existing custom post type definition plugins, such as CPTUI.
- The post type tool can be easily disabled with a filter, namely:
add_filter( 'acf/settings/enable_post_types', '__return_false' );
While investigating this ACF custom post-type release, we encountered some additional fun tidbits. They may not be directly related to ACF CPTs, but we thought we’d share because it’s a pretty neat little collection!
- ACF has a filter to show/hide the admin panel entirely. acf/settings/show_admin – this can keep developers, clients, and anyone else trawling through your WP admin panel from live-updating fields and post types.
- ACF has a filter to force the preview mode of an ACF Gutenberg block. This is great for ensuring your back-end editing interface looks just like the front-end. Within block.json, set your “mode” within your “acf” JSON to “preview” to force any ACF blocks into preview mode.
In fact, if you’d like to learn more about the advantages of using ACF to build Gutenberg blocks, check out this article by our WP Engineering Manager Oliver Harrison.
Links and More Information
Build With ACF — With Us
ACF is a foundational part of theme development at Kanopi. We’re excited to see the progression of ACF with these wonderful new features. And if you’re into building WordPress with ACF and other cutting-edge tools, we invite you to come and work with us!