 And I am a WordPress developer kind of front end person. My talk today is an introduction on advanced custom fields. So let's just get this started. We're going to kind of go through the slides a little bit quickly, and we're going to jump into some code. And if you have any questions, we'll save them at the end, OK? All right. So this is all of me. I enjoy ACF. It's probably my favorite plug-in that is in the WordPress ecosystem. So what is ACF? It is a plug-in to extended data functionality. It's free, and there is a paid pro version. And it was created by an Australian named Elliott Condon. He's really cool. And check out his website. Check out advanced custom fields. Smart guy, spot on. All right. So advanced custom fields, a set of user word presses built-in meta box features. You can use ACF to set up advanced meta data functionality, writes to the database, and can be retrieved anywhere within WordPress, including the REST API and Project Gutenberg. It also has a simple to use powerful ABI so you can extend what you do. You can actually create your own ACF fields. And it is pretty spectacular. The interface, the GUI for the back end is really smart and really spot on. All right, so getting started with ACF, I'm just going to walk through some screens. The actual ACF fields, the ACF API add-ons. And here we are at screens. So this is where you start out. When you install the plug-in, you've got a list of field groups. Field groups hold all of your fields. When you create a new field group, you can give it a title. And then you can see the different fields and labels and names and things for that. Then under the free version, you get a list of field types that you can select from. And you can also extend that with the pro version. These are some other settings that you can have. Rules, where you can say, hey, ACF, I only want you to be here or here or here and here. You can either make the field group active or you can not. The style, what that means is that you can have it set underneath the content editor, or you can have it set on the side where you see other meta boxes. All right, so these are a list of field types that you get. And with the pro version, you'll get a whole bunch more. All right, so here's the difference between the free version and the pro version. You should know that the four add-ons or premiums that you would get are being discontinued. So you can still buy them, but going forward, they want to move into a pro version that encompasses all of those add-ons. So a repeater field. So you can repeat a set of subfields, a gallery field, which is you can manage and create a better-looking gallery. And you can actually customize how that gallery works. Say you wanted to use your own light box, or you want to use Bootstrap or Foundation, whatever have you, an options page. So if you've ever seen a page builder that has options, you can actually use ACF to create an options field. So you can turn off and on things. You can add and store data inside of that. Flexible content manager. Think of you can have various layouts to use within your pages through advanced custom fields. So say you wanted a two-column layout, or you wanted a three-column layout, or you wanted a gallery section. You can set up ACF so you can go through and create those types of content areas. Here's a quick look at the API. You can extend the API. You can build on to it. You can actually have it. So you can pre- and post-process data that's coming from it. All right, so this is our demo time. And we're going to speed through our demo. We're going to install the plug-in. Everyone here knows how to install a plug-in. All right, setting up the free version. We'll go through that. We'll walk through the plug-in screen really quickly. We'll need to add in PHP code. So if you're not comfortable writing PHP code, it's pretty simple to kind of get started. There's lots of examples on the advanced custom fields website under documentation and resources. We can review our work, and then we can take a look at that. So let's look at our fields. So right now, I have two field groups. One that was created using advanced custom fields and advanced custom fields problems. So I'm going to just turn this off real quick. So under when we activate the advanced custom fields, we have our very first one. So what I did is I just created one field called demo image, and the type is called image. So if we were to edit this, and really quickly, we'll just take a look at it. So we give ourselves a field label name, and it automatically will add this in. So let's just say I just added an S to this. When we tab it, it automatically will add it in for you. You can also overwrite this and make it anything you want. This is what you will call this field name, is what you will call inside your PHP code. Here's some of our different field types. So text, text area, WYSIWYG, you can do an own bed, you can do selects, checkboxes, true or false, which is basically saying yes or no. If someone clicks yes or no, whatever have you. You can do relational connections. You can actually use some jQuery. jQuery is inside of ACF, and then you actually have some layouts for the actual ACF fields. So we're just going to leave this on image. Now under the return value, you can select the different types of returns you want. So an array, URL, or an ID. If you're doing very intricate PHP work where you need to do counts and iterations in your PHP code or in switching, you would want to adjust the return value to meet that. The preview size, you can actually preview the thumbnail inside of the image, or inside of the editor field, and then we can jump into our pages and rules and things like that. So I'm going to, yep, I know, I'm going to leave this. So I'm going to change our plugin and go to, I'm going to deactivate this and activate our advanced, or our pro version. Our pro version will give us these fields down here at the bottom, the flexible content, gallery options, and repeater pages. You should know that each one of these additional plugins are $25 each. But if you buy the pro version, it's $25 and you get all of those added in. But that's per one site. But if you were to do a pro version, which is unlimited sites and it's a lifetime license, you get all four of those for $100. Let's see here. So let's just go back to our field, custom field settings, field groups. This is our pro version. So what I have is a gallery repeater. The repeater is a paid plugin. So what I'm able to do with this is I'm able to put all of my separate fields and even add different fields into this repeater. And then I am able to use that as a repeatable module on my page. And the page that I am editing would be the home page. And so how that looks right now is we have some content. So under the repeater, we can just add a new row and we'll have all three of those fields connected, which is all being powered by ACF. And you can add even more content to these fields and sections. But for now, we're just going to leave this and we're going to take a look on the front end of the website. And we don't have any code there. So let me quickly just switch to the code. So here's our code that we're going to use for this. And so I'm going to just shove this into one of my templates. Let me make sure that this doesn't break. And then I'm going to go back to this page. And now I have all of that content that I added into ACF right on this page. And so let's quickly just go back to this and we will present. OK, so I just quickly ran through everything because we're running out of time. Questions? I can take one or two. Two questions. Anybody? Yes? Yes. So the content won't be on the pages. And what will happen is it just won't show. But if you return the field back on, that data has been written to the database. So that data will still be there. Best case used for that is shove all the plugins you don't want your client to mess with into must use plugins. And then they can't delete them in that sense. One more question. Anyone? No? Once, twice? All right. You will go to advancedcustomfields.com slash, or up at the top bar, click on Documentation. And then there's a for each field type. There's examples of how to do that. You can get the slides on speaker deck, the cupcake images were by Brooke Lark. And thank you very much. Thank you.