Join Morten Rand-Hendriksen for an in-depth discussion in this video What is ACF?, part of WordPress Plugins: Advanced Custom Fields.
Before we look at the Advanced Custom Fields plugin, it is important to understand what the custom fields are and how they work inside of WordPress. If you create a new post in your WordPress site, you know that you have the standard fields. The title field, the content field, and you have your post format field, your categories, your tags, and your featured image. But you have additional fields that you can choose to activate if you want to. That are hidden under the Screen Options sections.
So if you click on Screen Options in the top right hand corner, you open all the different fields you can display within your post editor. And one of those is custom fields. If you activate custom fields, you get a new panel inside the editor, right down here under your content. That's called custom fields. And from here, you can enter a new field name, something like color. And then you can enter a field value. And what happens when you add a new custom field is you are injecting new information into the database. So here I've created a new field with the name color and the value ededed and then from my theme I can say go to the database and find the custom field, with the name color and give me its value.
And then I can take that value and either apply it to content on the page or display the text from the value outright. That means you can use custom fields to display whatever content you want in any way you want. Here, you could add in plain text, you could add in HTML formatted text, you could add in an image link, or a link to another post, or a link to another author, or pretty much whatever you want. The problem with custom fields as they're presented out of the box is that, it's not very user-friendly.
You have to know the name of the field that you want to use and you have to input the value manually. But in many cases you may want to use custom fields for something like linking to an existing post in your site or linking to another author or adding a bunch of new images into a custom gallery. And in those cases, using custom fields out of the box would be very frustrating; you have to navigate away from the site and find the links and then add them in or you have to add all the HTML for the image gallery in manually.
And this is where the plugin Advanced Custom Fields comes in. What Advanced Custom Fields does, is it gives you new types of custom fields that you can assign to your posts, your pages, and your custom post types. And you can individualize the custom fields to specific scenarios and you'll see how that works in a little bit. The cool thing about Advanced Custom Fields, is here you have specific fields that are designed for specific purposes. That means, you can add a wisiwig field. So, what you see is what you get field.
With the full editing capabilities for a field that should have HTML output. You can add a date field with the date picker for a date field. You can add a media field that actually has the media uploader with drag and drop functionality for additional media. You can also add fields that allow you to select from existing pulsar pages within your site, even from a specific category. And you can add fields that allow you to select from existing authors. In fact, Advanced Custom Fields is probably one of the most advanced plugins you can get for WordPress, and it's also the one that extends the functionality of WordPress the most.
This is why it's such a popular plugin, you can see here from the plugin directory page that this plugin has been downloaded from this here over 2 million times. And it's also a plugin that's extremely popular amongst developers because it adds full CMS capabilities to WordPress. While you can get Advanced Custom Fields from the WordPress.org plugin directory, you get all the information about advanced custom fields directly from its own website, advancedcustomfields.com. Here, you get a full breakdown of the plugin as it is.
Including documentation, that has code examples and a Q&A section. And pretty much anything you need to get the plugin to work. You also get a library of add-ons, where you can buy additional features to the plugin that give you new functionalities and allow you to do even more advanced things than what you get out of the box. In this course we'll be focusing on base behavior inside Advanced Custom Fields and I'll give you code examples and practical examples of how to use the plugin to do common tasks that you may want to do on your site.
Once you've watched this course and have a clear understanding of how the plugin works and how you can integrate it into your site, you can continue your learning by going to advancedcustomfields.com, and checking out some of the documentation and see how you can extend the plugin to do exactly what you want for your particular application. But that's enough talk about Advanced Custom Fields. It's time to look at how it works and how it could work for your site.