Introducing Conditional Blocks 2.0!

Full Site Editing is coming to WordPress. I think it’s going to be huge. And I believe Conditional Blocks will be the perfect companion for the block editor now and for the future with Full Site Editing themes. Of course, it’s easy just to say that… So let me show you what’s new in Conditional Blocks 2.0.

Summary | TLDR

  • The update is available now from your WordPress admin dashboard.
  • Conditional Blocks 2.0 is a complete rebuild.
  • Exisiting users can safely update, old conditions will continue to work in the background. Editing blocks with old conditions will require clicking “Convert to 2.0 conditions” when opening the Condition Builder.
  • New conditions and the preset manager are exclusively for Conditional Blocks Pro license holders.
  • Our site has had a makeover.

Complete new UI

I initially decided to build the original Conditional Blocks plugin to learn Gutenberg development. At that point in time, Gutenberg itself was very young and unpolished, as were my skills in React.

I wanted to create the new Conditional Blocks UI to give the user complete power and provide flexibility for furture development. So, I’m proud to introduce the Condition Builder!

The new UI brings a lot of benefits and is built with anticipation of new condition types in future. No matter what they could be.

So what does the new condition builder bring to the table?

  • Add multiple conditions to each block
  • Only conditions that are applied are shown, making it quicker to see at a glance.
  • Cleaner sidebar panel with small badges to show you which conditions are applied to the block without opening the condition builder.
  • Small “Conditional” badge in the top left corner of every block that will display conditionally. You won’t lose track of which blocks are conditonal anymore.
  • New condition types will fit in perfectly as they get added.
OLD: Before, not so good for many conditions.
New: Quick glance at active conditions and button for opening the condition builder.
NEW: “Conditional” badge displays on each conditional block.

New Condition Types

Conditional Blocks Pro 2.0 comes with 4 new condition types.

  • Query Strings – display a block based on URL query strings (highly requested)
  • PHP Logic – display a block based on PHP functions. Yes, developers will be able make custom conditions!
  • Post IDs – display a block based on multiple post IDs. Great for reusable blocks and when Full Site Editing is ready.
  • Presets – create your own presets to apply the same conditions across multiple blocks. This allows you to manage multiple blocks from the one preset! No need to manually edit each block that require the same visibility settings.

You can read more about each condition type in our documentation.

This brings us to a total of 3 free & 9 pro conditions with more to come! (Hint, the excitment has us Woo’ing 😁)

Updating from v1

There are no breaking changes when it comes to old blocks with conditions. They will continue to work in the background.

However, when you try to edit the conditions, you will need to click the “Convert to 2.0 Conditions”. Once clicked, the block will automatically be converted to the new struture. You can then open the Condition Builder.

If you have modifed the v1 code in any way, then you will experience breaking changes.

Wrapping up

I’m super excited to have released Conditional Blocks 2.0 and I’m looking forward to more improvements in 2021.

I’m planning on creating more advanced examples and video tutorials using blocks.

My ideas include

  • Building a lightweight membership site with Conditional Blocks.
  • Creating exclusive email upsells using query strings in links.
  • Creating landing pages with personalized offers.
  • Creating dedicated support forms for premium users.
  • More dynamic blocks around our site! There’s already a few. See if you can trigger them 🤫 (Hint click our link from twitter)
  • More vidoes for our new YouTube Channel.

If you have any suggestions or ideas please let me know via support.

Just for fun, here are the development statistics from version 1.0.9 to 2.0.

  • 140+ additional commits.
  • 44+ files changed (most are development only files).
  • Lines of code:  4,047+ additions and 3,444+ deletions.

One comment

  1. Awesome work Morgan! I’ll immediately start using this new conditions, and great job with the Condition Builder!

Comments are closed.