Content Visibility

More than two years ago, before WordPress 5.0 was released – and with it the inclusion of the Gutenberg editor as part of WordPress core – I wrote about an idea I’d had for quite some time. That idea, which I called Scheduled Blocks, culminated in an unfinished piece of work on github. It wasn’t perfect, but it worked.

A little bit disappointingly, that post was the last piece I’ve written on this site. I’ve written – very irregularly – on my personal blog, but nothing “work” related.

The idea, for those who don’t want to read that old post, is that with something like block scheduling, you would have full control over when each individual piece of content in a post or page would be published. WordPress has had the idea of scheduled posts for a long time, but you had to choose all or nothing – the entire post was either published or not. And, by default, you could schedule when a post was to be published in the future, but you couldn’t say “I’d like this post to stop being public after this date and time”.

I realized, relatively early on, that scheduling blocks was only one thing I’d like to be able to do with blocks. I’d like to be able to say “make this block only available to people signed in to a site” or with even more granularity “make this block only available to those signed in as editors”. It’d be nice to be able to combine rules, too. i.e. Make this product on my site only available between these two dates, to those who are signed in.

Meet Content Visibility.

A screenshot of the WordPress content editor a part of the sidebar highlighted. The highlight contains extra controls for the selected paragraph which allows the content author to limit when and to whom the paragraph is shown.
Content Visibility controls highlighted in the sidebar. This includes the User Role and Date and Time Add-Ons.

Content Visibility allows you or your site’s authors to decide when, where, and to whom, each piece – or block – of content is available. The core plugin allows you to limit the availability of blocks to those who are signed in or not.

Content Visibility Add-Ons

There are also two add-ons to content visibility.

The Content Visibility User Roles Add-On allows, as you have probably guessed, you to limit the visibility of a block – any block – to users with a certain role (or multiple roles).

And the Content Visibility Date and Time Add-On is the natural successor to scheduled blocks. It affords you the ability to decide when a block will be available and (optionally) when it will stop being available.

The add-ons are only available on github right now, they’ll hopefully be on the main WP plugins repo in the new year.

I have quite a few plans for additional add-ons for Content Visibility – some are mentioned in the readme – but if you can think of something that would really help you out, let me know. I’m actually really happy with the way it turned out, in terms of how “easy” (yeah I’m gonna regret that) it will be to provide additional types of rules – a lot of thought went into making this thing extensible.

I really hope that you enjoy using it, and it provides you a little more flexibility and control with your content. Also, I really hope this finds you safe, healthy, and well. 2020 has been a really, really weird year. Here’s hoping 2021 will be better for each and every one of us.


On a personal note, I’m really proud to get this set of plugins over the line. In this year, of all years, it’s really nice to be able to get a side project finished. (I did also say I’d write, record, and publish three entire courses this year but, well… 2020 am I right?)