latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

[s2if] adding before and after

Home Forums Community Forum [s2if] adding before and after

This topic contains 1 reply, has 2 voices. Last updated by  Bruce 3 years, 5 months ago.

Topic Author Topic
Posted: Monday Jul 22nd, 2013 at 9:07 pm #53833
Ray Bernard
Username: lavarat

Hello

I am using [s2If current_user_can(access_s2member_level2)] in a list to limit a menu item to level 2 subscribers and above. This tag is adding

<p></p>

before and after the statement it surrounds and messing up my menu. Any way to avoid this?

<div class="cssmenu">
<ul>
   <li><a href="/members/"><span>Introduction</span></a></li>
   <li class="active"><a href="/members/level1/"><span>Level 1</span></a></li>
   [s2If current_user_can(access_s2member_level2)]
   <li><a href="/members/level2/"><span>Level2</span></a></li>
   [/s2If]
   <li><a href="/members/my-profile/"><span>My Profile</span></a></li>
   <li><a href="/members/support/"><span>Support</span></a></li>
   <li><a href="/blog/" target="_blank"><span>Blog</span></a></li>
</ul>
</div>
Update:

I fixed it by adding the s2if inside the li tag:

<li>[s2If current_user_can(access_s2member_level2)]<a href="/members/level2/"><span>Level2</span></a> [/s2If]</li> 

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Jul 23rd, 2013 at 8:12 pm #53905
Bruce
Username: Bruce
Staff Member

I fixed it by adding the s2if inside the li tag:

Cool, glad to hear you fixed your issue. Let us know if you have any other issues!

Thanks!

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.