what are ACF in WordPress

What are Advanced Custom Fields (ACF) in WordPress?

"You don't know Advanced Custom Fields (ACF)? Without ACF, I definitely wouldn't use WordPress anymore." This is what a colleague wrote to me via Slack a few weeks ago. However, he is a developer, I am a designer. At the latest at this point, however, I realized that I should (and wanted to) deal with it.

What are Advanced Custom Fields (ACF)?

WordPress itself already offers a wide range of functions. With Advanced Custom Fields (ACF), you can extend these functions even further - free of charge in the standard version. They give you full control over the content of your website.

In the WordPress backend, we can find generic fields for posts and pages including title, content, date, and author. Advanced Custom Fields, or the plugin mentioned below, allow you to fully customize and adapt your WordPress posts and pages and thus the content of your site.

This means that just about anything is possible with WordPress - Advanced Custom Fields as a tuning for WordPress, so to speak.

What do I need Advanced Custom Fields for ?

In a nutshell: You probably need Advanced Custom Fields probably when you can't get any further with the on-board elements in the WordPress backend. You are faced with a challenge that cannot or can only partially be realized with the help of pages or posts. Depending on the customer's requirements, this can happen relatively quickly.

In my case, for example, I was allowed to build a search with filter criteria. So not a simple text search that searches for suitable content across the entire website, but a search in which specific data can be entered beforehand via a form. The user has various filter criteria available. These include

  • Name (text field)
  • Postcode (text field)
  • Country (drop down)
  • Certificates (checkbox)

But more about that later. This use case gave me the idea of using Advanced Custom Fields (ACF). Such an individual search is simply not possible with WordPress on-board elements without ACF.

Advanced Custom Fields: The free plugin

I was therefore looking for a solution to implement this filter search using Advanced Custom Fields .

The eponymous plugin in the official WordPress plugin directory is constantly being developed further, so new functions are appearing all the time. If you want to be close to the action, you can follow ACF on Twitter.

The ACF plugin is active on well over 1 million websites. It is intensively tested and works flawlessly with the latest WordPress version. It is also impressive that plugin has already received more than 1,000 5-star ratings. This compares to a measly 40 ratings with just one star - most likely users who gave up after a (very) short time.

You do need to have patience with plugins of this kind and spend some time learning how they work. Of course, I've also only scratched the surface of what's possible with Advanced Custom Fields. While there are plugins that you install and they then run by themselves in the background, I want to emphasize that ACF doesn't belong to that category. You have to actively participate in shaping what you're doing and recognize the overall connection between database, backend, and frontend.

Another crucial part of this rather technical plugin is the support.

I have not yet had to make use of this myself. The reason is simple: the first-class documentation, which covers field types, functions, filters and FAQs.

"*" indicates required fields

I would like to subscribe to the newsletter to be informed about new blog articles, ebooks, features and news about WordPress. I can withdraw my consent at any time. Please note our Privacy Policy.
This field is for validation and should not be changed.

What are custom post types?

Earlier I mentioned that active design is necessary. At Advanced Custom Fields , this also means that in certain cases these alone will not be of much use to you. Only in combination with Custom Post Types do further options arise.

The first question is: What is a (normal) post type?

The two best known in WordPress are Pages and posts(Blog Posts). For each new content to be created for a website, you decide which post type is the most suitable. This depends on several factors, including how you want the information to be visible and which fields you need in the backend.

But what happens if you want to publish content that a normal page or post can't manage?

You might already have a clue: You need a new way to add content to the backend. A kind of input mask with exactly the fields you need. This is what Advanced Custom Fields offers you. The plugin with the same name mentioned above allows you to define and create these fields comfortably in the backend. Once this structure is in place, you can move on to the next step.

advanced custom fields own fields
You can easily define fields in the backend of the ACF plugin.

This is when custom post types are used. It is very important here that it makes sense to create your own custom post type for the use of Advanced Custom Fields . In my case, I simply call the custom post type (CPT) "therapist".

You can of course also program the custom post type yourself. However, I have used the plugin "Custom Post Type UI" for this, which I will explain in more detail in the next section.

custom post type creation
This is how the backend of the Custom Post Type UI plugin looks like.

Custom Post Type UI: Free of charge plugin

If Advanced Custom Fields (ACF) weren't enough wizardry for you so far, we've got something else up our sleeve: ACF in combination with Custom Post Type UI, short CPT UI.

This allows you to display database content directly in the frontend as desired. In my case, I was faced with the challenge of building a filter search with different fields. I had to first upload all the data into the backend using a CSV import.

After the import, I used Custom Post Type and Advanced Custom Fields for the basis of my filter search in the frontend. More about this in the next section.

custom post type acf combination
This is an example of what your new Custom Post Type could look like.

Practical example: Building a search with filter criteria

Let's leave the backend behind us for now. Now it's on to the frontend so you're able to use the individual Advanced Custom Fields for yourself.

I have used the ACF to build an individual search with filter criteria. But how is it possible to present the content from the backend elegantly in the frontend so that the user can interact with it?

Again, you have the choice between developing it yourself and using plugin. Once again, I spent a long time looking for a good little helper and finally came across Search & Filter Pro.

Now I have an ingenious way to use the data available in the backend for the display in the frontend. In my example, these are:

  • Search (normal search field)
  • Post Meta (access and search for the respective Advanced Custom Field in the database)
  • Submit button (button for submitting the search query or form)

It could look like this in the backend:

search and filter pro backend
With the plugin "Search & Filter Pro" you can create an individual search with filter criteria.

Then you can use shortcodes to insert the filter search at any place in the backend (for example on a page).

However, you will see that this will still look a little unattractive. I've improved this with a few CSS changes and I think the result in the frontend is quite impressive:

practical example acf

I'm looking forward to seeing what else I can implement with Advanced Custom Fields in the future. Do you have any questions or comments about this article? Then I look forward to receiving your feedback.

Your questions about ACF

What questions do you have about ACF and WordPress? Feel free to use the comment function. You want to be informed about new postson the topic of WordPress and web design? Then follow us on Twitter, Facebook, LinkedIn or via our newsletter.

Did you like the article?

Your rating helps us improve our future content.

Post a comment

Your email address will not be published. Required fields are marked with *.