Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-13T16:21:22-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6123 2011-05-13T16:21:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6123&p=14942#p14942 <![CDATA[Re: conditional tags do not work]]> Statistics: Posted by Jason Caldwell — May 13th, 2011, 4:21 pm


]]>
2011-05-13T10:42:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6123&p=14882#p14882 <![CDATA[Re: conditional tags do not work]]> Statistics: Posted by buddy101 — May 13th, 2011, 10:42 am


]]>
2011-05-03T23:43:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6123&p=14059#p14059 <![CDATA[Re: conditional tags do not work]]>
Could you post the actual code you tried to protect the content?

And could you please post screenshots of the access restriction panels in your General Options page? WP Admin -> s2Member -> General Options

Statistics: Posted by Cristián Lávaque — May 3rd, 2011, 11:43 pm


]]>
2011-05-03T22:06:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6123&p=14028#p14028 <![CDATA[Re: conditional tags do not work]]>
Code:
current_user_cannot
instead of
Code:
!current_user_can
, it still does not seem to work. Both
Code:
current_user_cannot
and
Code:
current_user_can
seem to be satisfied on the protected content. This may be a bug triggered if the content was at some point protected at post level and now being switched to conditional protection ? I have no idea what is going on.

Statistics: Posted by buddy101 — May 3rd, 2011, 10:06 pm


]]>
2011-04-19T20:55:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6123&p=12961#p12961 <![CDATA[Re: conditional tags do not work]]>

That's weird. OK, try using the current_user_cannot function instead then:

Code:
[s2If current_user_cannot(access_s2member_level0)]
...
[/s2If]


I'd also suggest you take a look at the alt. views protection setting. WP Admin -> s2Member -> General Options -> Alternative Views Protection

And watch this video, it may help you with this: http://www.s2member.com/content-restric ... ble-video/

If you still have trouble with this, please post a screenshot of your content protection panels from General Options.

Statistics: Posted by Cristián Lávaque — April 19th, 2011, 8:55 pm


]]>
2011-04-19T17:52:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6123&p=12956#p12956 <![CDATA[conditional tags do not work]]>
Conditionals with s2If do not seem to work for me for some reason. Here is what I tried -

1. i changed the post access restriction from level0 to blank (using level 0 only for now)
2. added the following after the more tag in html view

Code:
[s2If !current_user_can(access_s2member_level0)]
If you wish to read further, you would need to be a <strong>[s2Get constant="S2MEMBER_LEVEL0_LABEL" /]</strong>. <a href="[s2Get constant="S2MEMBER_LOGIN_PAGE_URL" /]">Login</a> to your account or if you have not registered with us yet, feel free to <a href="[s2Get constant="S2MEMBER_LOGIN_PAGE_URL" /]?action=register">register</a> to gain access to this content.
[/s2If]


[s2If current_user_can(access_s2member_level0)]
Protected content goes here.
[/s2If]


3. When I access the post as a guest, I can see both Protected content and the prompt to register (which would suggest both ifs are succeeding !!). Sometimes I get redirected to membership options page as if there was a post level restriction.

Statistics: Posted by buddy101 — April 19th, 2011, 5:52 pm


]]>