Community Support Forums — WordPress® ( Users Helping Users ) — 2012-01-16T22:38:48-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16653 2012-01-16T22:38:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=60761#p60761 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]>

Statistics: Posted by Raam Dev — January 16th, 2012, 10:38 pm


]]>
2012-01-16T16:26:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=60727#p60727 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]> [s2If current_user_can(access_s2member_level1) AND current_user_can(access_s2member_ccap_jhjournal) AND current_user_cannot(access_s2member_level2)]

it seems to be working right:) Thanks !

Statistics: Posted by Theresap — January 16th, 2012, 4:26 pm


]]>
2012-01-16T16:09:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=60726#p60726 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]> [s2If current_user_is(s2member_level2)]

Your Subscriptions:
The Joyous Home Journal
The Tea Times

[/s2If]

What do I need to add to the above code (the code in the previous post) to say don't show to level 2? Can that be done?

Then, is the code correct below for just level 2 to see?

Statistics: Posted by Theresap — January 16th, 2012, 4:09 pm


]]>
2012-01-04T17:46:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=59672#p59672 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]> Let us know if there's anything else we can help with!

Statistics: Posted by Raam Dev — January 4th, 2012, 5:46 pm


]]>
2012-01-03T18:44:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=59600#p59600 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]> Theresa

Statistics: Posted by Theresap — January 3rd, 2012, 6:44 pm


]]>
2012-01-03T18:23:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=59598#p59598 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]>
I've modified the code below to fix that:

Code:
[s2If current_user_can(access_s2member_level1)]
[s2If current_user_can(access_s2member_ccap_jhjournal)]
The Joyous Home Journal
Upgrade and add the Tea Times
[/s2If]
[/s2If]

[s2If current_user_can(access_s2member_level1)]
[s2If current_user_can(access_s2member_ccap_teatimes)]
The Tea Times
Upgrade and add The Joyous Home Journal
[/s2If]
[/s2If]


A more simple way to write the above code would be like this:


Code:
[s2If current_user_can(access_s2member_level1) AND current_user_can(access_s2member_ccap_jhjournal)]
The Joyous Home Journal
Upgrade and add the Tea Times
[/s2If]

[s2If current_user_can(access_s2member_level1) AND current_user_can(access_s2member_ccap_teatimes)]
The Tea Times
Upgrade and add The Joyous Home Journal
[/s2If]

Statistics: Posted by Raam Dev — January 3rd, 2012, 6:23 pm


]]>
2012-01-03T17:47:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=59584#p59584 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]> Statistics: Posted by Theresap — January 3rd, 2012, 5:47 pm


]]>
2012-01-03T17:29:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=59578#p59578 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]>
[s2If current_user_can(access_s2member_level1)]
The Joyous Home Journal
[s2If current_user_can(access_s2member_ccap_jhjournal)]
Upgrade and add the Tea Times
[/s2If]
[/s2If]

[s2If current_user_can(access_s2member_level1)]
The Tea Times
[s2If current_user_can(access_s2member_ccap_teatimes)]
Upgrade and add The Joyous Home Journal
[/s2If]
[/s2If]

Hope this helps. :)

Statistics: Posted by Eduan — January 3rd, 2012, 5:29 pm


]]>
2012-01-03T17:24:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=59576#p59576 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]> Fatal error: s2If, malformed conditional [ current_user_can(access_s2member_ccap_jhjournal ]

Here is what I used:
[s2If current_user_can(access_s2member_level1)]
The Joyous Home Journal
[s2If current_user_can(access_s2member_ccap_jhjournal]
Upgrade and add the Tea Times
[/s2If]
[/s2If]

[s2If current_user_can(access_s2member_level1)]
The Tea Times
[s2If current_user_can(access_s2member_ccap_teatimes]
Upgrade and add The Joyous Home Journal
[/s2If]
[/s2If]


I think it would be better if it stated that if you cannot access the custom capability then show the upgrade section? Instead of it saying if you can access this one, add the upgrade? Thank you for your help!

Statistics: Posted by Theresap — January 3rd, 2012, 5:24 pm


]]>
2012-01-03T16:47:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=59571#p59571 <![CDATA[Re: Simple Shortcode Conditionals - Is this right?]]>
You almost got it. You need to close any opening [s2If]'s with [/s2If]. Also, I noticed you had an underline character in two of your IF blocks that shouldn't be there: [_s2If current_user_can.

So here's the corrected code:

Code:
[s2If current_user_can(access_s2member_level1)]
Subscription one
[s2If current_user_can(access_s2member_ccap_sub_one)]
Add (upgrade) to subscription two
[/s2If]
[/s2If]

[s2If current_user_can(access_s2member_level1)]
Subscription two
[s2If current_user_can(access_s2member_ccap_sub_two)]
Add subscription one
[/s2If]
[/s2If]

Statistics: Posted by Raam Dev — January 3rd, 2012, 4:47 pm


]]>
2012-01-03T16:45:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=59570#p59570 <![CDATA[Re: Shortcode Conditionals -]]> Both the Journal and Tea Times are level one. I want the upgrade to show on the one they don't have, and nothing to show for the ones they do. Is there any way to do this? I've made a test member and just can't get it right.

(I got how to make only level 2 show if they order both.)

[s2If current_user_is(s2member_level1)]

The Joyous Home Journal

[_s2If current_user_cannot(access_s2member_ccap_teatimes)]

Upgrade and add the Tea Times

[/s2If]

[s2If current_user_is(s2member_level1)]
The Tea Times

[_s2If current_user_cannot(access_s2member_ccap_jhjournal)]

Upgrade and add The Joyous Home Journal

[/s2If]

Thank you!

Statistics: Posted by Theresap — January 3rd, 2012, 4:45 pm


]]>
2012-01-02T20:20:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16653&p=59465#p59465 <![CDATA[Simple Shortcode Conditionals - Is this right?]]> I'm wanting to set up shortcode conditionals on the member page, the level is the same, just the capabilities are different.
I want both subscriptions to show but only the 'add this subscription' to show if they don't have it. So if they have sub two there is no reason for the add sub two to show.


[s2If current_user_can(access_s2member_level1)]
Subscription one
[_s2If current_user_can(access_s2member_ccap_sub_one)]
Add (upgrade) to subscription two (I only want members with subscription one to see this)
[/s2If]

[s2If current_user_can(access_s2member_level1)]
Subscription two
[_s2If current_user_can(access_s2member_ccap_sub_two)](I only want members with subscription two to see this)
Add subscription one
[/s2If]

If they already have both, can it be written that neither 'add this subscription' shows? Also, can it be written for only the subscription link the member has signed up for to show (ex. if they don't have sub one, just show sub two and the option to add sub one) Instead of having all the subscriptions show and after clicking they get the sign up button?

Thanks for such a flexible plugin, I hope I didn't sound too confused! Appreciate your help. Theresa

Statistics: Posted by Theresap — January 2nd, 2012, 8:20 pm


]]>