Container visible for login users

Can i show different container for login and different for logout users (clients on woocommerce). It is some option in Bricks to hide the page from logout users - without other plugins?

Display Conditions aren’t in Bricks yet but will be soon (it’s on the roadmap). I assume there are some workarounds available but not sure what they’d be and if they’d interfere at all.

Thx for replay! Soon means more like days, weeks or few months? Need to build simple b2b sell portal for my website and i want to put Bricks on the track, to get some rest from oxygen and have some fun. It’s really simple and fun with Bricks woocommerce elements :slight_smile: all i need is that conditions.

Only the developers of Bricks will know the answer to that timeline question, but my guess is weeks to months. You can see the Display Conditions feature request here: Roadmap – Bricks

Hi,
This is pretty easy to implement with a WP shortcode if you’re OK with simple Gutenberg content:

add_shortcode('logged_in_access', function( $atts, $content = null ) {
    if ( !is_user_logged_in() && !is_null($content) && !is_feed() )
       return $content;
} );

Then in your content:

[logged_in_access]
Content to hide for non logged in users,
bla bla bla...
[/logged_in_access]

I guess you could also call Bricks global sections or elements with shortcodes inside the shortcode and display complex Bricks stuff, but haven’t tested yet.

We could really use a shortcode wrapper element like Oxygen to build complex stuff while waiting for conditions :wink:

1 Like