---
title: "How to Set WordPress Display Conditions Based on Date & Time?"
url: https://nexterwp.com/docs/set-wordpress-display-conditions-based-on-date-and-time/
date: 2023-07-11
modified: 2026-04-14
author: "Aditya Sharma"
description: "We all want to be able to customise our website content based on the date and time. Whether it’s to showcase upcoming events or run promotions at a specific date..."
image: https://nexterwp.com/wp-content/uploads/2024/05/set-wordpress-display-conditions-based-on-date-and-time-1024x519.jpg
word_count: 827
---

# How to Set WordPress Display Conditions Based on Date & Time?

## Key Takeaways

- Nexter Blocks includes the Display Rules extension for setting display conditions based on date and time.
- Users can set promotional content visibility for a specific date range using the Current Date option in the Rule dropdown.
- The Time of Day option allows users to display content after a specific time, such as after 12:00 pm on a chosen date.
- The Day of Week option enables users to show content on specific days, like displaying a discount message every Thursday.

We all want to be able to customise our website content based on the date and time. Whether it’s to showcase upcoming events or run promotions at a specific date and time, setting display conditions based on date and time can be extremely useful. With the Display Rules extension from the Nexter Blocks, you can set different display conditions based on date and time.

*To check the complete feature overview documentation of the Nexter Blocks Display Rules extension,* [click here](https://nexterwp.com/docs/add-display-rules-in-wordpress/).

***Requirement  - This extension is a part of the Nexter Blocks, make sure it's installed & activated to enjoy all its powers.***

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

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

To add display conditions based on date and time using the Display Rules extension, add any block from the Nexter Blocks on 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 have to set the actual display condition. You can have one or multiple conditions/rules.

4. To set date and time based display rules, click on the **Item 0** tab. In the **Rule** dropdown, you’ll find different options under the **Date & Time **label.

## How to Set WordPress Display Conditions Based on Current Date?

If you want to show some promotional content related to a sale or something similar for a specific date range, you can use this option. This option allows you to show or hide content in a particular date range. 

To set display conditions for a date range - 

1. Select **Current Date** from the **Rule** dropdown under the **Item 0 **tab.

![](https://nexterwp.com/wp-content/uploads/2023/07/display-rules-current-date-new.gif)

2. Then, 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 **Start Date **and **End Date **sections, choose the start and end date, respectively.

For example, if you want to show a discount offer message related to the Christmas sale, then after selecting **Current Date** from the **Rule** dropdown, choose **Is** from the second dropdown. 

Then in the **Start Date **and **End Date **sections, choose the date range, for example, 25th Dec to 1st Jan.

That will make the message visible from 25th Dec to 1st Jan.

If the option is set to **Not** in the second dropdown, it will reverse the condition.

## How to Set WordPress Display Conditions Based on Time of Day?

You can use this option If you want to show or hide specific content after a particular time of a day. This can be used to display some limited time offer on your website at a specific time of a day.

To set display conditions based on time of day - 

1. Select **Time of Day** from the **Rule** dropdown under the **Item 0 **tab.

![](https://nexterwp.com/wp-content/uploads/2023/07/display-rules-time-of-day-new.gif)

2. Then, 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 **Time** field, you’ll have to set the exact time, after which the display condition will work.

4. Then in the **Date** field, select the date.

For example, if you want to show a discount message after 12:00 pm, then after selecting **Time of Day** from the **Rule** dropdown, choose **Is** from the second dropdown.

Then in the **Time** field, set the time exactly to 12:00 pm.

Finally, select the date from the **Date** field.

This will show the message after 12:00 pm on that specific date.

If the option is set to **Not** in the second dropdown, it will reverse the condition.

## How to Set WordPress Display Conditions Based on Day of Week?

If you want to show specific content on specific days of the week, like showing different food menus on different days of the week, this option can be ideal for you. With this option, you can show or hide content on specific days of the week. 

To set display conditions for certain days of the week - 

1. Select **Day of Week** from the **Rule** dropdown under the **Item 0 **tab.

![](https://nexterwp.com/wp-content/uploads/2023/07/display-rules-day-of-week-new.gif)

2. Then, 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 last dropdown, select the days you want the display condition to work.

For example, we want to show a special discount message every Thursday on the website. To do this after selecting **Day of Week** from the **Rule** dropdown, choose **Is** from the second dropdown.

Then in the last dropdown, select Thursday from the dropdown.

This will show the content automatically on every Thursday.

If the option is set to **Not** in the second dropdown, it will reverse the condition.

> *Note: You can add multiple days together.*

Also, read [How to Set WordPress Display Conditions Based on Visitor/Login Status](https://nexterwp.com/docs/set-wordpress-display-conditions-based-on-login-status/).

## Frequently Asked Questions

**Q: What if the display conditions based on date aren't working?**
A: If your display conditions based on date aren't functioning, check the date range you've set. Ensure that the Start Date and End Date are correctly configured in the Current Date option. If you selected 'Not' in the Is/Not dropdown, remember that it will reverse the condition, potentially hiding content you want visible. Double-check these settings to troubleshoot the issue.

**Q: What are the best practices for setting display conditions based on the day of the week?**
A: When setting display conditions based on the day of the week, consider your audience's behavior. For instance, if you run a restaurant, showing different menus on specific days can enhance user engagement. Use the Day of Week option, select 'Is' in the Is/Not dropdown, and choose the relevant days. This approach ensures that your content remains relevant and timely.

**Q: Can I combine date and time conditions for display rules?**
A: While the tutorial focuses on separate conditions for date and time, you can effectively combine them by setting multiple rules. For instance, you can show content based on a specific date range and also restrict it to certain times of the day. This layered approach allows for precise control over content visibility, enhancing your site's promotional capabilities.
