Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-08T21:26:28-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6345 2011-05-08T21:26:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14418#p14418 <![CDATA[Re: Different page whether logged in or not]]>

Statistics: Posted by Cristián Lávaque — May 8th, 2011, 9:26 pm


]]>
2011-05-08T20:19:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14417#p14417 <![CDATA[Re: Different page whether logged in or not]]> You can have a look at what i did so far on the site:
http://scrapbookcampus.com/ is the main site
http://scrapbookcampus.com/basic-tutori ... tshop-pro/ is the page where i used those conditionals. If you log in as member0 (pw= member0) you will see how the page is different.

Yayyy!!!! (i even found it WITHOUT the programmer beside me... thanks to Cristian!)

Statistics: Posted by cassel — May 8th, 2011, 8:19 pm


]]>
2011-05-08T20:11:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14416#p14416 <![CDATA[Re: Different page whether logged in or not]]>

Instead of removing it, in case that's not possible with a condition, why not just show something else?

Statistics: Posted by Cristián Lávaque — May 8th, 2011, 8:11 pm


]]>
2011-05-08T15:02:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14411#p14411 <![CDATA[Re: Different page whether logged in or not]]>
I managed to get one leaf for the non-logged in visitor to display the content with this code:
Code:
<?php if (!is_user_logged_in()) { ?>
You should see this general public leaf
<?php ?>


And if the user is a registered member only, to display it with this code:
Code:
<?php if (current_user_is("s2member_level0")) { ?>
You should see this leaf
<?php ?>


Now, i just have to figure out how to get the leaf to completely disappear if not to be displayed, instead of ending up with an empty leaf. I will keep you updated in this thread in case someone else has to deal with that theme. It is a GREAT theme to work with!

Statistics: Posted by cassel — May 8th, 2011, 3:02 pm


]]>
2011-05-08T13:47:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14409#p14409 <![CDATA[Re: Different page whether logged in or not]]>
Code:
<?php if (current_user_is("s2member_level1")) && (current_user_can("access_s2member_ccap_BASIC")){ ?>
    Display the content for the ccap Basic.
<?php } else if (current_user_is("s2member_level1")) { ?>
    Display the content for registered members only
<?php } else if (current_user_is("s2member_level0")){ ?>
    Display the content for registered members only
<?php } else { ?>
    Display the general "sales" page for general public
<?php ?>


Now, i would have to figure out how to code the different leafs into this... hum.... right?

Statistics: Posted by cassel — May 8th, 2011, 1:47 pm


]]>
2011-05-08T11:50:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14407#p14407 <![CDATA[Re: Different page whether logged in or not]]>
For example if a person clicks on the "Course" tab:
Code:
[s2If !is_user_logged_in()]
Display the content for all visitors, but hide the page for registered, and paid members
[/s2If]

[_s2If current_user_is(s2member_level0)]
Display the "sales page" for registered members, but, hide the specific "sales" page for visitors, and the page for paid members.
[/_s2If]

[_s2If current_user_is(s2member_level1)]
Display the page for Paid memers, but hide the previous two pages
[/_s2If]


Not sure my logic matches the coding, but that is the idea. Right now, i am mostly brainstorming. I THINK i can figure it out with the custom capabilities as to whether to display the Registered member page or the Paid member page, but i dont know how to NOT display the one for unregistered visitors.

Statistics: Posted by cassel — May 8th, 2011, 11:50 am


]]>
2011-05-08T11:30:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14406#p14406 <![CDATA[Re: Different page whether logged in or not]]>
We can get a conditional whether to display a page or not, but what we need is a way to NOT display the pages that are "below" the member's level. Maybe we should play with different versions of the conditionals.

Statistics: Posted by cassel — May 8th, 2011, 11:30 am


]]>
2011-05-08T11:20:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14404#p14404 <![CDATA[Re: Different page whether logged in or not]]> Statistics: Posted by Cristián Lávaque — May 8th, 2011, 11:20 am


]]>
2011-05-08T08:42:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14400#p14400 <![CDATA[Re: Different page whether logged in or not]]>
For viewers not logged in at all: http://digiscrapcampus.com/main/basic-teaser/
For logged in viewers: http://digiscrapcampus.com/main/basic/ (there should be units up to 12 listed)
For paid viewers: http://digiscrapcampus.com/main/basic-free/ (where all the units WILL be linked to accessible pages)

Each section of the page is a separate LEAF and not entered in the wp page/post. Could i still use the same type of conditionals?

P.S. this site is ONLY a test site. Nothing is real.

Statistics: Posted by cassel — May 8th, 2011, 8:42 am


]]>
2011-05-07T14:51:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14372#p14372 <![CDATA[Re: Different page whether logged in or not]]>

Statistics: Posted by Cristián Lávaque — May 7th, 2011, 2:51 pm


]]>
2011-05-07T13:31:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14363#p14363 <![CDATA[Re: Different page whether logged in or not]]> Statistics: Posted by cassel — May 7th, 2011, 1:31 pm


]]>
2011-05-07T13:22:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14361#p14361 <![CDATA[Re: Different page whether logged in or not]]>

You can do this with conditionals, so instead of protecting the whole page from the metabox in the top-right corner of edit.php, you'd use conditionals right in the body of the page/post to decide what to display.

WP Admin -> s2Member -> API / Scripting -> Using Simple Conditionals
WP Admin -> s2Member -> API / Scripting -> Using Advanced Conditionals

http://www.s2member.com/api-scripting-overview-video/
http://www.s2member.com/advanced-conditionals-video/

I hope that helps.

Statistics: Posted by Cristián Lávaque — May 7th, 2011, 1:22 pm


]]>
2011-05-07T09:22:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6345&p=14345#p14345 <![CDATA[Different page whether logged in or not]]>
I want to have one page that is visible to non-registered members, listing all the advantages of being registered (they will see what will be accessible for them), AND also, if they are members, show them the same list, BUT with also a pitch to what they can get if they BUY the package.

So it would look something like this:
- non-members will SEE the list and description of units 1-12 - no link and a "sales" pitch saying that if they register, they will be able to access the content of units 1-3
- members will SEE the same list and description of units 1-12, but with units 1-3 already linked and accessible, but then, a "sales" pitch saying they can get access to units 4-12 if they buy
- paying members will SEE the same list and description, but all the units, 1-12 will be linked and their content will be accessible, but no more "sales" pitch

The "problem" is that i want one of these pages to display, only, depending on their membership status. Is that feasible? If so, can you just guide me where i can find the specific information? if it is too advanced for me, i can just let the programmer work on it, but i still want to understand the basic of how it is done (even if i do not understand the actual coding involved).

Thanks

Statistics: Posted by cassel — May 7th, 2011, 9:22 am


]]>