This is a premium condition to change the visibility of WordPress content using Conditional Blocks Pro.
(P.S This block is a Reusable Block + Conditions. It won’t be shown if you’ve purchased Conditional Blocks Pro)
Do you have an upcoming sale or holiday planned? Date conditions on Gutenberg blocks will allow you to schedule content to show between set dates. We even allow multiple date ranges!
Date conditions can be paired with any third party blocks. We’d recommend notification style blocks, but you can be creative and think outside the “block”.
How to set up date condtions
- Make sure you have Conditional Blocks Pro up and running.
- Select the block that you wish to display between specific dates
- In the right sidebar select Date Conditions and click Add New.
You’ll be presented with date input fields where you can set the start date and end date. This will be the duration of when your block will be shown on the frontend of your website.
Multiple Date Ranges
For multilple date ranges just select the desired block and click Add New. Each date range will be active simultaneously. If you want to turn off date range conditions for a block, you must remove all dates from the selected block.
There’s a small timezone indicator on the block’s date range settings to let you know what your current WordPress timezone (UTC offset) is set to.
Dates are based on your WordPress timezone setting. You can change the timezone of your WordPress site by going to the General Settings in the admin dashboard.
Time support is active by default, so you can set your exact date and time range. Make sure to use 24-hour time format to get the correct results.
If you’d like to restrict a block to only show on one day from midnight to midnight then set the date to be same for the start and end date and set the time as follows.
Start time: 00:00
End time: 23:59