Show Block Between Date Ranges

Available in 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

set Gutenberg block to display between dates
set Gutenberg block to display between dates
  1. Make sure you have Conditional Blocks Pro up and running.
  2. Select the block that you wish to display between specific dates
  3. 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.

Timezone

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

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