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

Key Takeaways

  • Display Rules extension from Nexter Blocks allows setting display conditions based on ACF custom field types like text fields, selection fields, and boolean values.
  • Nexter Blocks supports creating personalized experiences for membership sites by showing or hiding content based on account status stored in custom fields.
  • ACF Date/Time fields enable control over content visibility based on specific dates and times, ideal for time-sensitive announcements.
  • Nexter Blocks requires installation and activation to utilize the Display Rules extension for setting display conditions.
Table of Contents

Are you looking to set display conditions based on custom fields on your WordPress site? Custom fields allow you to add additional information on posts, pages, products, or custom post types. By setting display conditions based on custom field values, you can create highly personalized experiences for your visitors.

The Display Rules extension from Nexter Blocks lets you set display conditions based on different ACF custom field types, including text fields, selection fields, button groups, boolean values, and date/time fields.

To see the complete feature overview, see the Display Rules documentation.

Best Used For:

  • Membership sites that show or hide content blocks based on account status or user type stored in custom fields
  • WooCommerce stores displaying product-specific blocks based on custom attribute values set in ACF
  • Event and news sites controlling content visibility based on scheduled dates in ACF Date/Time fields

Requirement – This extension is a part of Nexter Blocks. Make sure it is installed and activated to enjoy all its powers.

For creating custom fields, use the free Advanced Custom Fields (ACF) plugin.

Note: Here, we are using blocks from the Nexter Blocks.

To add display conditions based on custom fields, add any block from Nexter Blocks to the page.

1. Go to Advanced > Nexter : Display Rules.

2. Turn on the Display Rules toggle.

3. After selecting the appropriate option from the Display When dropdown, go to the Rules section. Here you set the actual display condition. You can have one or multiple conditions.

4. Click on the Item 0 tab. In the Rule dropdown, you will find different options under the ACF label.

How to Set WordPress Display Conditions Based on ACF Text Fields?

With this option, you can show or hide content based on the values of different ACF text fields such as text, number, range, email, URL, password, and text area. This is useful when you want to personalize content for specific visitors. For example, you can show a block only when a Name field matches a particular value, or hide a section when a password field does not match.

Suppose you have created a custom field group called Additional Information for your posts with a Text field called Name set to the value “Sam.”

acf text field

To set the display condition based on the value of that text field, select the block on the page.

1. Choose ACF : Text Fields from the first dropdown under the Item 0 tab.

display rules acf text fields new

2. In the Is/Not dropdown, you have two options:

Is – This will make the statement true.

Not – This will make the statement false.

3. In the third dropdown, select the field label.

4. In the last field, add the same text field value that you entered in the ACF field.

Depending on your choice in the second field (Is or Not), your content will be visible or hidden.

Following this process, you can set display conditions based on the values of other ACF text fields.

To display actual ACF field values as content in your blocks, the dynamic content feature in Nexter Blocks lets you output field data directly in the WordPress block editor.

How to Set WordPress Display Conditions Based on ACF Selection?

With this option, you can set display conditions based on the values of different ACF selection fields such as select dropdowns, radio buttons, and checkboxes. This is useful when you want to show or hide content based on a chosen option. For example, you can display a block only when a Status field is set to Editor.

Following the previous example, a Status dropdown has been added within the Additional Information section with Editor as the selected value.

acf select field

To set the display condition based on the value of that select field, select the block on the page.

1. Choose ACF : Selection from the first dropdown under the Item 0 tab.

display rules acf selection new 1

2. In the Is/Not dropdown, you have two options:

Is – This will make the statement true.

Not – This will make the statement false.

3. In the third dropdown, select the field label.

4. In the last field, add the same field value that you entered in the ACF field.

Note: You can add multiple values here, this is ideal for the Checkbox field.

Depending on your choice in the second field (Is or Not), your content will be visible or hidden.

Following this process, you can set display conditions based on the values of other ACF selection fields.

How to Set WordPress Display Conditions Based on ACF Button Group?

This option lets you set display conditions based on the values of ACF button group fields. Use this when you want to control block visibility based on a multi-state button field. For example, you can show a section only when a Profile field’s Show button is selected.

Building on the example above, a Profile field has been added to the Additional Information section with two buttons: Show and Hide. The Show button is selected.

acf button group

To set the display condition based on the value of that button, select the block on the page.

1. Choose ACF : Button Group from the first dropdown under the Item 0 tab.

display rules acf button group new 1

2. In the Is/Not dropdown, you have two options:

Is – This will make the statement true.

Not – This will make the statement false.

3. In the third dropdown, select the field label.

4. In the last field, add the button value.

Note: You can add multiple values as well.

Depending on your choice in the second field (Is or Not), your content will be visible or hidden.

How to Set WordPress Display Conditions Based on ACF Boolean?

This option lets you set display conditions based on the ACF boolean value. A boolean field can only have a True or False value. This is ideal when you want to show or hide content based on a simple yes/no status. For example, you can display a members-only block only when a Paid field is set to True.

Continuing the example above, a boolean field named Paid has been added to mark the status of the post.

acf boolean

To set the display condition based on the boolean value, select the block on the page.

1. Choose ACF : Boolean from the first dropdown under the Item 0 tab.

display rules acf boolean new

2. In the Is/Not dropdown, you have two options:

Is – This will make the statement true.

Not – This will make the statement false.

3. In the third dropdown, select the field label.

4. In the last dropdown, select True or False to match your display condition.

Depending on your choice in the second field (Is or Not), your content will be visible or hidden.

For building a post listing page that combines custom field conditions with dynamic content, see How to Add a Post Listing in WordPress for the full block setup.

How to Set WordPress Display Conditions Based on ACF Date / Time?

Using this feature, you can control when certain content appears on your website by specifying a particular date and time through ACF Date fields. This is useful for time-sensitive content such as event announcements, limited-time offers, or sections that should appear before or after a specific date.

In this example, a section named Date has been created within the Additional Information part with a specific date and time set.

acf date time new

To set a display condition based on that date value, select the block on the page.

1. Choose ACF : Date / Time from the first dropdown under the Item 0 tab.

display rules acf date time new

2. In the Is/Not dropdown, you have two options:

Is – This will make the statement true.

Not – This will make the statement false.

3. In the third dropdown, select the field label.

4. In the Before Date / Time section, choose an earlier date and time than what you have set in the ACF field.

Note: Depending on the ACF settings you can work with date only as well.

Depending on your choice in the second field (Is or Not), your content will be visible or hidden after that specific date.

You can also set display conditions based on archive page content. See How to Set WordPress Display Conditions Based on Archive Page Content for the full setup.

About the Author

Photo of Aditya Sharma CMO of NexterWP
CMO at POSIMYTH Innovations · NexterWP · 7 years experience

He has spent years in the WordPress ecosystem building, breaking, and optimizing sites until they actually perform. He works at the intersection of speed, growth, and usability, helping creators ship websites that load fast and convert. An active WordPress community contributor sharing through tools, tutorials, and direct collaboration. Tested practice, not theory.

WordpressThemesElementorn8nAIClaudeAutomationServer

Share your Thoughts

Get Instant Answers to all your questions about Nexter Blocks,
Extensions & Theme trained on 1000+ Docs and Videos

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

What if the display conditions based on ACF fields aren't working?

If your display conditions aren't functioning as expected, double-check that the Display Rules extension from Nexter Blocks is installed and activated. Ensure that you've correctly selected the appropriate ACF field type and that the values match what you've set in the ACF plugin. Any mismatch in field labels or values can cause the conditions to fail.

What is the best practice for setting display conditions based on ACF Date/Time fields?

When using ACF Date/Time fields for display conditions, it's best to set conditions that account for both past and future dates. This ensures that content appears or disappears at the right time. For instance, if you're promoting an event, set the condition to show content only after the event date has passed to avoid displaying outdated information.

How do I set display conditions based on ACF Boolean values?

To set display conditions based on ACF Boolean values, select the ACF: Boolean option in the Display Rules settings. This allows you to show or hide content based on a true/false status, such as displaying a members-only section when a 'Paid' field is set to True. This is particularly useful for controlling access to premium content.

How can I troubleshoot issues with ACF selection fields not displaying correctly?

If ACF selection fields are not displaying as expected, verify that the correct field type is selected in the Display Rules settings. Ensure that the values in the ACF fields match those set in your conditions. Additionally, check if multiple values are required for checkbox fields, as this can affect visibility based on user selections.

Last reviewed: April 24, 2026

Related Docs