World’s Greatest Plugin: Advanced Custom Fields
The Advanced Custom Field (ACF) Plugin is the primary plugin I’ve used on all sites since I began WordPress theme development in 2017. It is extremely flexible, powerful, and user-friendly on both the development side and client side.
This post walks through some of the functionality of the plugin and explains exactly why I believe it to be the best plugin created to date, in my humble opinion.
CAUTION: After reading through this blog you may have a better understanding of the plugins and how it works, but this does not mean you can go in and edit ACF fields. This can break the PHP causing errors or fields may not display correctly or at all.
To start, let’s go over some basics.
What is a plugin?
A plugin is a piece of software containing a group of functions (code) that can be added to a WordPress website. They can extend functionality or add new features to your site, often without the need to know anything about coding.
There are thousands of WordPress plugins available for free, as well as a ton of amazing options to buy from third-parties. To add them to your site, you must have special permissions.
Plugins are written in the PHP programming language and integrate seamlessly with WordPress.
As web developers often say: “there’s a plugin for that!”
What is a custom post type?
Custom post types (CPTs) are content types like posts and pages.
Since WordPress evolved from a simple blogging platform into a robust content management system, the term “post” stuck. By default, all WordPress installs come with Posts. You can, however, also create custom post types, such as Productions, Clients, etc. For example, on our StageHand template, we have a custom post type called Productions, that we have tailored to the template’s needs.
What is a taxonomy?
A taxonomy is a distinction created to group your content. You can use categories for broad topics and tags for details in your text. You can also create custom taxonomies.
These are quite useful, especially for filtering. On most occasions when Ligature creates a filter, it uses a taxonomy to do so. A great example of how we use taxonomies as filters can be found here.
Now that you have a basic understanding of these elements—we can get to the good stuff!
Advanced Custom Fields plugin
Advanced Custom Fields (ACF) is a WordPress plugin that allows developers to add extra content fields to your site’s edit screens. These additional content fields are more commonly referred to as Custom Fields and allow you to build websites faster and present an easier backend for clients.
Fields can be added on-demand—the field builder allows you to quickly and easily add fields to WP edit screens.
ACF fields can be added anywhere including post types, users, taxonomy terms, media, and even custom options pages.
- Post Types: ACF fields can easily be added to all post types including any custom post type.
- Users: ACF includes integration with WP users. There is a user field type from which you can select a dropdown list of the site’s users. Fields can also be added to the user profiles with the option of specifying specific roles.
- Taxonomies: ACF fields can be added to custom taxonomies. Each taxonomy has its own page by default where it shows a list of posts with that category or tag. This is where these ACF fields are useful.
- Media: Fields can also be added to media files in the media library, including credits, metadata, thumbnails, etc.
- Options Pages: Developers can create an options tab and subpages to the dashboard. We often use this for footer information.
ACF Field Groups
ACF uses field groups to attach fields to different elements throughout the site. Each field group contains a title, fields, location rules, and visual settings. This is where you control where fields appear in the WP dashboard, where the fields appear on an edit page screen, and which default WP fields are shown or hidden.
ACF Field Types
Advanced Custom Fields offers 29 field types! These include file upload, checkbox, radio button, color picker, date picker, WYSIWYG editor, and several others.
Flexible UI Layout Options
ACF offers flexible layout options for WP’s edit pages. Fields groups can be added above or below the default WP text editor. They can also be placed in the sidebar.
Adding Field Content to the Site
To get ACF field content to appear on the front end, PHP coding knowledge is required. ACF comes with an extensive library of functions, hooks, and filters to allow ultimate customization.
We set up these fields to make inputting data as easy as possible for our clients. And we take care of the rest!
Hopefully, this gives you a basic understanding of how Advanced Custom Fields works. If you are interested in learning more, advancedcustomfields.com is a great resource.