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.

Customizing Pages for specific user levels

Home Forums Community Forum Customizing Pages for specific user levels

This topic contains 2 replies, has 3 voices. Last updated by  Bruce 4 years ago.

Topic Author Topic
Posted: Friday Dec 28th, 2012 at 12:07 am #35596

I apologize if this has been answered somewhere. I’ve looked at all the knowledge base items and have TRIED to search, but can’t seem to find anything relevant.

I have a “Join Us” page – the default, public one that anyone can see – and I am trying to add shortcodes to customize this, depending on whether the person reaching the page is a member (0-4) or not. People get redirected to this page if they try to access a part of the site that requires a higher member level (or ANY member level). They also can get to it simply by clicking on “Join Us” in the menu.

I’ve used the same shortcodes for this page that I used on the special “member log in” page, but something’s not right. All five of the options AND all of their s2if shortcodes are visible. I’ve pasted it all below. I didn’t think I needed PHP for this? The add-in you recommend is 2 years out of date, anyway.

Warning: I can follow directions, and cut and paste, but am not really a coder. Please keep it simple! Thanks!
The page is http://fairregistry.org/join-us.

[s2If current_user_can(access_s2member_level4)] Since you are logged in as a website admin, you should not have been redirected to this page. Better go check some settings somewhere. If you actually do want to change your member level CLICK HERE.[/s2If]

[s2If current_user_cannot(access_s2member_level4) AND current_user_can(access_s2member_level3)] You've reached this page because you have tried to access a page that is only available to site administrators. To change your member level CLICK HERE.[/s2If]

[s2If current_user_cannot(access_s2member_level4) AND current_user_cannot(access_s2member_level3) AND current_user_can(access_s2member_level2)] You've reached this page because you have tried to access a page that is only available to FAIR's leadership. If you feel you've reached this in error, please contact us at info@fairregistry.org. To change your member level CLICK HERE.[/s2If]

[s2If current_user_cannot(access_s2member_level4) AND current_user_cannot(access_s2member_level3) AND current_user_cannot(access_s2member_level2) AND current_user_can(access_s2member_level1)] You've reached this page because you have tried to access a page that is only available to Sustaining Members. If you feel you've reached this in error, please contact us at info@fairregistry.org. to change your member level CLICK HERE. [/s2If]

[s2If current_user_cannot(access_s2member_level4) AND current_user_cannot(access_s2member_level3) AND current_user_cannot(access_s2member_level2) AND current_user_cannot(access_s2member_level1) AND current_user_can(access_s2member_level0)] You've reached this page because you have not -- yet! -- become a contributing member of FAIR. We encourage all interested persons to support us in our quest for effective sexual offense laws in Maryland that will truly improve public safety. To change your member level CLICK HERE.

[/s2If] [s2If current_user_cannot(access_s2member_level4) AND current_user_cannot(access_s2member_level3) AND current_user_cannot(access_s2member_level2) AND current_user_cannot(access_s2member_level1) AND current_user_cannot(access_s2member_level0)]
You have reached this page either because you tried to access a members-only area of our website, or because you are interested in becoming a member of FAIR. We encourage all interested persons to support us in our quest for effective sexual offense laws in Maryland that will truly improve public safety.

Prefer to mail a check? Can't become a paying member yet? Please click the button to the right to sign up for free. We'll "upgrade" your membership when we receive your check

If you feel you reached this page in error, please contact info@fairregistry.org. Thank you. [/s2If]

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Friday Dec 28th, 2012 at 6:11 pm #35668
David Welch
Username: dwbiz05

FYI this loads correctly for me…

Dave

Posted: Saturday Dec 29th, 2012 at 1:54 pm #35725
Bruce
Username: Bruce
Staff Member

Hi Brenda,

This usually is caused by a theme incompatibility. Some themes will not grab post data the correct way, therefore causing shortcodes not to work. Try reverting to the default WordPress 2010/2011 theme and see if that makes the shortcodes work.

If it does, you should contact your theme’s designer. In the short-term, you may be able to activate a PHP execution plugin, and wrap the the WordPress function do_shortcode() around each set of s2If shortcodes.:

<?php do_shortcode("&#91;&#91;s2If current_user_can(access_s2member_level4)&#93; Since you are logged in as a website admin, you should not have been redirected to this page. Better go check some settings somewhere. If you actually do want to change your member level CLICK HERE.&#91;/s2If&#93;&#93;"); ?>
Viewing 2 replies - 1 through 2 (of 2 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.