Skip to content

How to Set WordPress Display Conditions Based on Dynamic Custom Fields?

Key Takeaways

{"bullets":["Nexter Blocks Pro requires Advanced Custom Fields installed and active for every ACF condition, and Display Rules must be switched on under Nexter > Blocks in the WordPress dashboard.","ACF : Text Fields uses exact matching only, so a value like "Sale" does not match "On Sale" and trailing spaces or different capitalisation can stop a rule from matching.","ACF : Selection, ACF : Button Group, ACF : Boolean, and ACF : Date / Time each map to specific field types, and a rule only matches when the custom field already exists on the content being viewed."]}

Table of Contents

A custom field is data a template doesn’t have to show plainly. A Display Rule can still read it.

Five ACF-aware conditions let a block react to a custom field’s actual value — a text match, a selected option, a button group choice, a yes/no toggle, or a date.

For every Dynamic Device setting in one place, see the Display Rules feature guide.

Before You Start

  • Edition: Pro — every ACF condition needs Nexter Blocks Pro, and Advanced Custom Fields installed and active.
  • Block to enable: Display Rules, switched on under Nexter > Blocks in your WordPress dashboard.

Steps

  1. Open the block you want to control, go to Advanced > Nexter : Display Rules, and switch on Display Rules.
The Display Rules toggle
  1. Set Rule to the condition you want to check.
The Rule setting
  1. Set Rule to the ACF field type you are checking — ACF : Text Fields, ACF : Selection, ACF : Button Group, ACF : Boolean or ACF : Date / Time.
  1. Choose the specific custom field from the list.
  1. Type or choose the value that should trigger the rule.

ACF : Text Fields needs an exact match. Read directly in the block’s own comparison logic: the rule checks whether the field’s value is identical to what you typed, with no partial or “contains” matching.

The Five ACF Rules

RuleMatches against
ACF : Text FieldsAn exact match against a Text or Textarea field’s value
ACF : SelectionA chosen option from a Select, Radio or Checkbox field
ACF : Button GroupA chosen option from a Button Group field
ACF : BooleanA True/False field’s state
ACF : Date / TimeA Date or Date Time field’s value

How It Behaves

  • Text matching is exact, not partial. A rule looking for “Sale” will not match a field that contains “On Sale” — the value has to match precisely.
  • Selection and Button Group read the field’s own configured choices, so the value you pick in the rule is the same option a visitor would see in the field itself.
  • Every ACF rule needs a matching field to actually exist on the content being viewed — a page without that field never matches.

Limitations

  • No partial text matching — ACF : Text Fields needs the field’s value to match exactly.
  • Requires Advanced Custom Fields to be installed and active, with the field already created.
  • This wave did not measure every ACF field type against a live, seeded field — the exact-match behaviour is confirmed from the block’s own code, not watched on a published page.

Troubleshooting

My rule doesn’t match even though the field looks right

Check for a trailing space, different capitalisation, or any other small difference — ACF : Text Fields requires an exact match, with nothing partial accepted.

The field I need isn’t in the list

Confirm the field is created in ACF and assigned to the content type you are viewing — the rule can only offer fields that actually exist.

A Selection or Button Group rule never matches

Pick the value from the rule’s own dropdown rather than typing it, so it matches the field’s configured choices exactly.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!