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.

Logout Redirect

Home Forums Community Forum Logout Redirect

This topic contains 1 reply, has 2 voices. Last updated by  Raam Dev 4 years, 4 months ago.

Topic Author Topic
Posted: Monday Sep 10th, 2012 at 8:58 am #24744

I’ve got the Login redirect working but…
How can I configure s2member to show a different LOGOUT page for each membership level? i.e. Level zero logout redirects to a sales page, level 1 logout redirects to a Thank You page, etc.

Also, is there a way to retrieve a member’s ccap designation and use that info to display the area(s) they have access to?

Thanks in advance,

Barry.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Sep 11th, 2012 at 12:01 am #24834
Raam Dev
Username: Raam
Staff Member

Barry,

You can use the wp_logout_url() function to generate a Logout link that redirects to a specific URL. Please see the documentation on the WordPress Codex for more info.

To check if a user has a specific ccap, you can use the current_user_can() function like this:

<?php if(current_user_can("access_s2member_ccap_free_gift")){ ?>
        Display info about the ccap free_gift here.
<?php } ?>

(For more info on s2Member Conditionals, please see Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals.)

To embed something like this inside a WordPress post/page, you’ll need to be using the Exec-PHP Plugin.

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.