From the course: WordPress: Advanced Custom Fields

What do blocks mean in ACF? - WordPress Tutorial

From the course: WordPress: Advanced Custom Fields

Start my 1-month free trial

What do blocks mean in ACF?

- [Instructor] With The New Block Editor in WordPress, also known as Gutenberg, creating richer content became easier. It also gave us a more visual representation of the content. Short codes can also now be blocks. This provides us with a unique opportunity for our custom fields. Instead of showing our new content in the ACF short code, we can represent it as a block. The ACF team has also made it incredibly easy for us to do that, without needing to learn JavaScript. Specifically react code. We can define the field group, assign it to our block, and then add PHP templates in CSS to display play the block on both the front end and in the WordPress Editor. This gives us another potentially more flexible avenue for displaying custom content without having to modify our theme template files. This could also be useful if we have content that we don't necessarily want to associate with a specific post or page. A custom field block let's us create a set of fields that can be used anywhere in the block editor. Today, and in future versions of WordPress. There are three steps to creating an ACF block. Defining the field group in the WordPress Editor. Defining the block in our theme plugin. And creating the display templates and styles. Let's take a closer look at each one.

Contents