Explore Conditional Logic in ACF

See, one of the reasons why Advanced Custom Fields is so popular is because of all the interesting implementations it allows.

And one powerful option here is Conditional Logic, which lets you show/hide fields based on how a previous field was answered.

Let’s look at a quick example of how this Conditional Logic works.

Let’s say that you want to blog about food, your travels, or anything other than running. When you’re writing about a non-run topic, it doesn’t make much sense to display the custom fields for information about the run, right?

You can explore our blog on the creation of custom fields in the backend.

What if, instead of automatically displaying all the custom fields just shared above, you could add a custom field that says “Is this post a run?”:

If you check the box, then the run information fields automatically appear. If you leave it unchecked, they stay hidden:

That’s what conditional logic allows you to do!

To set this up, you would edit your field group and add a new True / False field for “Is this a run?”:

Then, you would edit the existing fields and turn on Conditional Logic so that each field only displays when the “Is this a run?” field is checked: