Conditional visibility (show/hide)

A work-around to display content (show/hide) within Bricks based on conditions.

For example:

  • If ACF field = Yes, then show contact form.
  • If ACF field = No, then hide contact form.
9 Likes

Yep. This would be awesome for Metabox as well.

This functionality would be great to be in the core. For Elementor I used an external plugin for this functionality and that should be in the core.

2 Likes

yes it would be great to get that in bricks core :+1:

2 Likes

Even if it was conditional, ie if = < > that would make it amazingly powerful. I know that is what would be the final thing to use bricks for all the projects I have on the go!

Conditional display logic.

This is a feature that should go ahead of all. Very useful for delivering the website to the customer with custom fields.

https://bricksbuilder.io/ideas/#2697

1 Like

Yep,

it starts with simple things like if(has_post_thumbnail) → show header section with featured image in the background… if not, don´t show it. I don´t know how to solve this, except for using a custom code block.

Anyone else looking forward to this?

Hey @thomas! do you have a prediction? :raised_hands:

1 Like

It is possible currently do set up conditions using a workaround if you can’t wait.

Save the content as a Section and call it via do_shortcode() inside a Code element.

2 Likes

Will conditions in process allow Elements to be shown / hidden based on breakpoints?

I have no idea how this works. Do you have any tutorials please? :grimacing:

You can find some examples here: Filter: bricks/element/render – Bricks Academy

If those do not work for your case, can you elaborate on your current setup (what type of field, what is the view etc.)?

1 Like

Yes! Thank you! This is what I’ve been looking for! How did I miss this in the changelog :man_facepalming: