Archived topic
Show/hide a block based on custom field value
7 replies · Started by Brenden on July 30, 2021
Is there a way to show or hide a block based upon a custom field value?
I have a custom post type with custom fields (created by MetaBox.io). I would like to have a radio button custom field with options 'Fall' and 'Spring'. If set to 'Fall', I want to hide container block 'A' and show container block 'B'. If set to 'Spring', I want to show container block 'A' and hide container block 'B'. Is this possible with GeneratePress and GenerateBlocks?
Every Beaver Builder module has this functionality available. However, I would much rather do this in GeneratePress if possible.
Hi Brenden,
Unfortunately there isn't an option built-in in GB for this.
I kind of like the idea though - will add it as a potential feature to add in GB pro.
Sorry about that!
Thanks for the reply! In absence of this option, would you recommend a plugin link Conditional Blocks Pro (https://conditionalblocks.com/)? Or do you have any other recommendations?
I've not tried the plugin before but might be worth a shot!
We haven't had other similar requests on this before so I'm not sure if it will be added as an option in the near future.
That makes sense. I'll try out that plugin and report back on my experience.
Sounds good.
Thank you!
So far so good. Conditional Blocks Pro is working exactly as I had hoped!
That's awesome :)