---
title: "How to Set WordPress Display Conditions Based on Dynamic Custom Fields?"
url: https://nexterwp.com/docs/set-wordpress-display-conditions-based-on-dynamic-custom-fields/
date: 2023-09-13
modified: 2026-09-17
lang: en
author: "Aditya Sharma"
description: "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..."
image: https://nexterwp.com/wp-content/uploads/2024/05/set-wordpress-display-conditions-based-on-dynamic-custom-fields-1024x519.jpg
word_count: 519
---

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

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](https://nexterwp.com/docs/add-display-rules-in-wordpress/).*

[LIVE BLOCK LINK](https://nexterwp.com/nexter-blocks/extras/wordpress-display-conditional-rules/)

## 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

- Open the block you want to control, go to **Advanced > Nexter : Display Rules**, and switch on **Display Rules**.

![The Display Rules toggle](https://nexterwp.com/wp-content/uploads/2026/09/dr-toggle.webp)

- Set **Rule** to the condition you want to check.

![The Rule setting](https://nexterwp.com/wp-content/uploads/2026/09/dr-rule.webp)

- Set **Rule** to the ACF field type you are checking — ACF : Text Fields, ACF : Selection, ACF : Button Group, ACF : Boolean or ACF : Date / Time.

- Choose the specific custom field from the list.

- 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

| Rule | Matches against |
| ---- | --------------- |
| ACF : Text Fields | An exact match against a Text or Textarea field's value |
| ACF : Selection | A chosen option from a Select, Radio or Checkbox field |
| ACF : Button Group | A chosen option from a Button Group field |
| ACF : Boolean | A True/False field's state |
| ACF : Date / Time | A 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

- [Display Rules feature guide](https://nexterwp.com/docs/add-display-rules-in-wordpress/)- [Single page content](https://nexterwp.com/docs/set-wordpress-display-conditions-based-on-single-page-content/)- [Archive page content](https://nexterwp.com/docs/set-wordpress-display-conditions-based-on-archive-page-content/)- [Date and time](https://nexterwp.com/docs/set-wordpress-display-conditions-based-on-date-and-time/)