Page 1 of 1

Multiple [s2If] shows higher level content

PostPosted: March 30th, 2011, 5:21 am
by vbsql7
In a page widget I have the code below. When I log in as a level1 user, however, I see the level2 admin link:

[s2If !current_user_can(access_s2member_level1)]
This area is for Residents only.
[/s2If]
[s2If current_user_can(access_s2member_level1)]
<ul>
<li><a href="/residents-list">Residents List</a></li>
<li><a href="/facilities-information/">Facilities Info</a></li>
<li><a href="/forum">Forum</a></li>
<li><a href="/polls">Poll</a></li>
<li><a href="/my-profile">My Profile</a></li>
[s2If current_user_can(access_s2member_level2)]
<li><a href="/wp-admin/">Admin</a></li>
[/s2If]

[s2If current_user_can(access_s2member_level1)]
<li><a href="/wp-login.php?redirect_to=/resident-home">Log Out</a></li>
</ul>
[/s2If]


Thanks for any help you can provide.
Michael

Re: Multiple [s2If] shows higher level content

PostPosted: March 30th, 2011, 5:51 am
by benchefe
[_s2If current_user_can(access_s2member_level2)]
<li><a href="/wp-admin/">Admin</a></li>
[/_s2If]

you forgot the "_" in front of the shortcodes!

Greetings

Re: Multiple [s2If] shows higher level content

PostPosted: March 30th, 2011, 7:17 am
by vbsql7
benchefe wrote:[_s2If current_user_can(access_s2member_level2)]
<li><a href="/wp-admin/">Admin</a></li>
[/_s2If]

you forgot the "_" in front of the shortcodes!

Greetings


Thank you benchefe. Turns out I didn't need the "_" because I wasn't using a nested statement... but I was missing the first end-if. Your comment helped me take a closer look. Thanks!

Michael