Hide elementor section for level 1

Hi, I use elementor as a pagebuilder.
I want to hide a section in elementor for level 1 users. I have tried the shortcode [s2If current_user_is(s2member_level1)], but when I put the closing shortcode [/s2If] below the content of my section, it just displays “[/s2If]” as text and my section is not hidden…

Has anyone a solution?

I am also using Elementor. You likely need to have the shortcode wrap the whole content, widget by widget. So if you have a section with a Title widget, a Text widget and an Image widget, you you have to have the shortcode in each of them (of they accept shortcodes too, as they might not all accept them).

Is that how you do it?

1 Like

can you explain a little bit more? I do not understand how to do this…

S2Member conditional shortcodes will add conditions for everything between the start
[s2If current_user_is(s2member_level1)] and the closing [/s2If]. However, it won’t take effect if they are in separate widgets in Elementor.

For example, let’s say you have 3 widgets for members of Level 1 (a Title, an Image and some Text). You cannot have the shortcodes in this manner:

[s2If current_user_is(s2member_level1)]
[Title widget]
[Image widget]
[Text widget]

But what you will need is this:
{ [s2If current_user_is(s2member_level1)]
Title widget
[/s2If] }

{ [s2If current_user_is(s2member_level1)]
Image widget
[/s2If] }

{ [s2If current_user_is(s2member_level1)]
Text widget
[/s2If] }

(since I cannot draw boxes here, imagine that the box is between the { and }. Does that make more sense?