Show content at a date, time or on repeating schedule

Modified on Thu, 17 Mar, 2022 at 11:45 AM

The Date & Time control allows you to automatically schedule when content should be visible on your website.


This is a new feature. So, if you cannot see the option in the block editor please submit a support request for us to enable the feature on your site.


Usage Examples

  • Create timed promotional content that starts and stops at specific times
  • Automate the public release of event information. Keep your content hidden until the event has started
  • Use the Day of Week settings in Block Visibility to present a form only during surgery hours on week days


How to Enable

Click on any block in the Block Editor and navigate to the Visibility panel. You will notice the Date & Time control located underneath the Controls Toolbar. See the screenshot below. This control is enabled be default for all blocks. You can choose which controls are automatically enabled in the plugin’s General Settings.


How to Configure


Instructions are always better with examples. Let’s assume that we are running a promotion that needs to be visible between 9:00 am on July 12th and run through midnight on July 30th. Then we want to create another schedule for the same promotion in September. We want the promotion to run from September 1st through noon on September 15th.


We will use the Cover block to create the promotional banner.


Steps to Complete


  1. Navigate to the Date & Time control settings in the Visibility panel.
  2. Click on the “Now” button under the “Start showing” heading and a calendar will appear.
  3. Choose July 12, 2021 and set the time to 9:00 am. Then close the calendar popup.
  4. Click on the “Never” button under the “Stop showing” heading and a calendar will appear.
  5. Choose July 30, 2021 and set the time to 11:59 pm. Then close the calendar popup.
  6. Click on the “Add schedule” button to create the second schedule.
  7. Click on the “Now” button under the “Start showing” heading in the new schedule and a calendar will appear.
  8. Choose September 1, 2021 and set the time to 12:00 am. Then close the calendar popup.
  9. Click on the “Never” button under the “Stop showing” heading and a calendar will appear.
  10. Choose September 15, 2021 and set the time to 12:00 pm. Then close the calendar popup.

The resulting configuration should resemble the screenshot below.




How to Disable


If you would like to disable the Date & time control at the block level, simply click on the three-dots icon in the Controls Toolbar and deselect it. 


Control Settings


Schedules


The Date & Time control uses schedules, which are similar to rule sets in other visibility controls like the Location control. All settings within a schedule must be satisfied for the selected block to be visible. However, you can also create multiple schedules. Only one schedule needs to apply for the block to be visible. 


Within a schedule, you are creating AND conditions between each setting. Between two schedules, you are creating OR conditions.


The core Block Visibility plugin includes the Start Showing and Stop Showing settings. Block Visibility Pro adds additional options. See below.


Hide When Schedules Apply


By default, the block will be visible if the applied schedule settings are satisfied. Simply toggle the “Hide when schedules apply” setting to hide the block instead.


Day of Week


Enable the Day of Week settings by clicking on the “recursion” icon below the main schedule settings. Then choose the day(s) of the week that you would like the block to be visible on. See the screenshot below.



The Day of Week settings override the main Start and Stop settings. For example, assume you set the block to be visible between June 1st and June 3th and also chose Monday through Friday in the Day of Week settings. The block will be hidden on all Saturdays and Sundays between June 1st and June 3th.


That said, you do not necessarily need to set a Start and Stop date/time. Assume you want the selected block to only be visible very Monday. Just leave all other settings blank and choose “M” from the Day of Week settings.


Time of Day


Enable the Time of Day settings by clicking on the “clock” icon below the main schedule settings. Then choose the time interval that you would like the block to be visible on. You can also set multiple time intervals. See the screenshot below.



The Time of Day settings behave as you would expect. They override the main Start and Stop settings and partially override the Day of Week settings. For example, assume you set the block to be visible Monday through Friday between June 1st and June 3th. In the Time of Day settings you set a time interval of 9:00 am to 5:00 pm. The block will be hidden on all Saturdays and Sundays between June 1st and June 3th due to the Day of Week settings. Then on Monday through Friday the block will only be visible from 9:00 am to 5:00 pm.


That said, you do not necessarily need to set a Start and Stop date/time or Day of Week settings. Assume you want the selected block to only be visible from 9:00 am to 5:00 pm. Just leave all other settings blank and set the time interval accordingly in the from the Time of Day settings.


Note: Remember when you make any changes to your site clear your browser cache to view the latest version.

Please see our FAQ:

I cannot see my changes after publishing





Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article