WordPress is by far the most popular content management system (CMS) on the planet, but that doesn’t mean it’s a flawless platform straight out of the box.
My content management frustrations with WordPress stem from my experience managing websites for the hospitality industry. I have been in the hotel business my entire life and have worked in a marketing capacity for the past 9 years. The website of my current employer is a proprietary CMS that we chose for its publishing flow, among other things.
There are about 100 pages on this resort website. There is no blog. All of these pages are static, but they do need frequent updating. For example, the “Specials & Packages” page must be changed throughout the year as promotions come and go. It’s essential to have a platform that allows team members to make the necessary edits without changes actually going live until after a review.
The publishing flow looks like this:
- You make website edits in draft mode. The public-facing site does not change.
- The team reviews the edits.
- You publish the finalized edits to the public-facing site.
The CMS also allows you to show or hide certain content at will. Say I have advertised our annual winter sale with a nice writeup, picture, and booking links. When the promotion is over in the spring, I can simply hide the content from the public view. Next winter, all I need to do is re-enable the content, make some minor adjustments, and I’m good to go. No time is wasted recreating the advertisement from scratch.
Despite these benefits, I must be very clear that this proprietary CMS has numerous other issues. I love the flexibility we have in managing content, but I sincerely wish we were using WordPress. This conundrum got me thinking about how similar functionality could be replicated in WordPress itself.
Content management in WordPress
WordPress is a blogging platform at heart. As I am writing this article, I have the ability to save it as a draft. Then, when I am ready to release it to the world, I click “Publish”.
Now what if I need to make some edits? Of course, I can go back and make changes, but saving the article immediately publishes them live. Otherwise, I would need to “Switch to draft”, thereby unpublishing the page.
You may notice the problem here. If a page is already published, WordPress requires any edits to be made all in one go. I cannot save a draft while the page is simultaneously published. This can be challenging for businesses that have static pages on their website that need periodic updating. The issue is exacerbated when a team needs to draft edits across multiple pages. A good example happened a few months ago when we needed to add New Year’s Eve content on the dining, activities and accommodations pages simultaneously.
Managing all these changes can be a nightmare in core WordPress.
Furthermore, when content on a page is no longer relevant to the public, i.e. a winter sale come spring, it needs to be deleted entirely. But what if I need to add it back in nine months? Copy and paste the content to a text file and save for later? ????
How do we solve this?
Now of course there are solutions one could employ to alleviate these issues. The WordPress ecosystem is broad.
Perhaps I should add a custom post type for “Promotions” with a meta field for “Active/Disabled” that conditionally displays the content. Maybe I could use the Advanced Custom Fields (ACF) plugin to do something similar. Or better yet, I just hire website design agency to build a custom theme that provides additional management tools on top of the core WordPress functionality.
I even experimented with shortcodes to conditionally hide content… not pretty.
After years of working with WordPress on personal projects, I was never able to find a lightweight solution that met my needs while being intuitive for users who are not that WordPress savvy. Luckily the Block (Gutenberg) Editor arrived to solve all my problems.
My content management solution
With the introduction of the Block Editor, virtually every piece of content on a WordPress website can now be a “block”. We know that blocks can receive custom attributes. So what if I were to create specific attributes that control the visibility of a block?
As I was researching the Block Editor in the summer of 2020, others in the community had similar thoughts, notably the EditorsKit plugin. EditorsKit allows you to conditionally display a block based on screen size as well as a few other options. EditorsKit is a great plugin, but it includes a TON of other block-related functionality. All I needed was visibility control.
Enter my current project, Block Visibility. A purpose-built plugin designed to improve content management in WordPress.
Ok, ok. So this article is a bit of a sales pitch, but bear with me. ????
The first thing I set out to accomplish with Block Visibility was a way for users to add content to a published page but keep it hidden from the public until finalized. The key here was that other team members would need to be able to log in and preview the website edits. The solution was user-role control.
Block Visibility adds a “Visibility” panel to each block in the Block Editor. Simply toggle the content to “Logged-in” and it’s now only visible to logged-in team members. When the content is ready to go, just toggle it back to “Public” and voilà!
Using the “User Roles” option, you could also restrict the visibility to only “Editors” or “Administrators”. This is useful if you have other logged-in users on the website that shouldn’t be able to see the pending changes, perhaps customers or subscribers.
Next, I needed to be able to hide content that was no longer relevant on a page without having to delete it.
A simple “Hide block” toggle accomplishes this with ease. Problem number two, check. ????
Well, that was pretty easy!
Now my initial needs were pretty narrow. But how else could you use role-based visibility controls for blocks? What if you could schedule blocks to display only during specific periods of time? Or conditionally display content based on a user’s screen size? What about third-party integrations?
At the time of writing, Block Visibility currently includes the following visibility controls:
- Hide block control
- User role control
- Date & Time control with block scheduling
- Screen Size control (Desktop, Tablet, Mobile, etc.)
- URL Query String control
- WP Fusion control (Third-party Integration)
The plugin also features a host of settings that allow you to disable certain controls and restrict visibility to specific block types. I firmly believe you should be able to disable functionality you don’t need. This also simplifies the interface so your team and/or clients are not overwhelmed.
Finally, the best part… Block Visibility is freely available on WordPress.org!
None of this functionality would be possible without the Block Editor. I understand there is still a significant portion of the community that is apprehensive about switching to the new editor. However, there is no better time to start really diving into the Block Editor as well as the Site Editor which will be coming with Full Site Editing later this year.
I passionately believe that block visibility control greatly improves content management in WordPress. It has solved all my issues with ease, and once every piece of content on your website is a block, the applications are limitless.
Hopefully, I have intrigued you enough to give the plugin a try. If not, check out an unbiased review on the WordPress Tavern.
In all seriousness, I would love to hear if there are ways it can be improved. Is there any functionality you would like to see added? Also, are there any other content management tools you are using with WordPress that I should try out? Let me know!