If you’ve been around the WordPress development world for long, you’ve almost certainly heard of (and become a fan of!) Advanced Custom Fields. The vast majority of WordPress developers know how useful ACF can be: it makes adding custom fields to the WordPress admin area a snap.
But, did you know that you can use ACF to do a LOT more than just adding custom fields to posts and pages?
Ready to up your ACF game? Give one of the following “advanced” uses of this popular plugin a try. 😉
ACF options pages
ACF documentation for options pages: https://www.advancedcustomfields.com/resources/options-page/
How can you use it? To add a page to the WordPress dashboard that contains options (or settings) that can be accessed globally. Then, create a new fieldset with ACF that contains the options you want to set up on your new options page.
How do I use ACF options pages in my development business? Primarily, settings for custom post types archives. My settings cover things like number of posts per page, custom content for the archive page, and redirects…things that I don’t want to hard-code into the theme files since they make the site less customizable down the road.
Dynamically populating an ACF select field’s choices
ACF documentation for dynamically populated fields: https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/
How can you use it? To pre-populate the choices in an ACF select field with custom data that doesn’t have to be manually entered or updated.
How do I use ACF dynamically populated fields in my development business? Usually, pulling values from a repeater field on a custom options page to use in an ACF select field.
For example, I may have a “color” repeater field on the options page so that my clients can update colors for a custom post type easily in the future. Then, I use a dynamically populated select field on that custom post type to pull all the current colors from said options field. Automating this process is a lot easier for the end client than trying to explain to them how to keep multiple fields/options in sync.
More ACF ideas
The first place you should go? The ACF documentation! It contains a wealth of resources that can inspire you to use ACF in all-new ways.
Some of my favorites are:
- Creating a front-end form with ACF: https://www.advancedcustomfields.com/resources/create-a-front-end-form/
- Including ACF in your plugin or theme: https://www.advancedcustomfields.com/resources/including-acf-in-a-plugin-theme/ (note: I didn’t do this with Easier Business Blogging because of restrictions on sharing ACF PRO)
- Hide ACF menu from clients: https://www.advancedcustomfields.com/resources/how-to-hide-acf-menu-from-clients/
- Query & order posts by custom fields: https://www.advancedcustomfields.com/resources/query-posts-custom-fields/ – https://www.advancedcustomfields.com/resources/orde-posts-by-custom-fields/
- Sorting a repeater field: https://www.advancedcustomfields.com/resources/how-to-sorting-a-repeater-field/
- Adding custom settings to your fields: https://www.advancedcustomfields.com/resources/adding-custom-settings-fields/
- Adding your own field type to ACF: https://www.advancedcustomfields.com/resources/creating-a-new-field-type/
- Bidirectional relationships: https://www.advancedcustomfields.com/resources/bidirectional-relationships/
ACF is a lot more powerful than many developers realize. Take some time to get familiar with all the possibilities, and it’ll pay off in the long run!
What is the coolest thing you’ve ever done with ACF? Let me know in the comments below!