Easily Manage Promotions with Block Visibility



Block Visibility Tutorial

Black Friday and Cyber Monday are a very big deal, especially for those living in the United States. Nearly every online retailer will be running some sort of promotion during this time period, and these offers are typically displayed prominently on each website.

Here’s a great example from the clothing company J.Crew:

J.Crew promotional banner as of November 23, 2020

The marketers at J.Crew knew exactly when they wanted that red banner to appear on the homepage, perhaps in coordination with an email campaign. They also have a future plan for when the banner should be removed. As a major retail company, I assume there is technology on the backend of their proprietary website to automate this process.

How can we easily replicate this functionality in WordPress?

Date & Time Scheduling

In version 1.1 of Block Visibility, I added the ability to show or hide any block in the Block Editor based on a specified date and time. This new visibility control also allows you to select a range. Other than standard core WordPress blocks, this is all we need to create dynamically controlled content.

On my homepage, I would start by using a Cover block to build the promotional banner. Something like the following:

The fonts and typography are a bit off, but they are close enough.

Then all I need to do is configure the Date & Time settings on the Visibility tab. In this example, I want the banner to start displaying on Block Friday and run through Cyber Monday. Depending on your implementation, you could also combine the Date & Time settings with the User Roles control to show different offers to your subscribers (reward members) and the general public.

And we are done. The banner will start showing on November 27th, and as soon as the clock strikes midnight on November 30th, the banner will automatically disappear. Simple as that!

This example just scratches the surface of what Block Visibility can do, and there are endless applications for visibility control. If you haven’t already, give it a try!

Nick Diego Avatar

Nick is the creator of Block Visibility. He is also an active WordPress contributor and Developer Advocate focusing on block-based WordPress. You can follow him on Twitter or reach out in WordPress Slack at @ndiego.

Share Your Thoughts

Your email address will not be published. Required fields are marked *

Recent Posts

Ready to try Block Visibility?

Unlock the power of the Block Editor with location controls, advanced block scheduling, and more!