Jason Caldwell wrote:Thanks for the great question.In your Dashboard, under: s2Member -> API Scripting -> API Constants, you will find reference to this PHP Constant:
S2MEMBER_LOGIN_WELCOME_PAGE_URLSo you can use this PHP Constant inside a PHP theme file, or even inside a Post/Page
if you have the
PHP Execution plugin installed. Here is a quick code sample.
- Code: Select all
<a href="<?php echo S2MEMBER_LOGIN_WELCOME_PAGE_URL; ?>">My Account</a>
* Note that this PHP Constant is dynamically adjusted for the current User/Member. So whatever you've configured as your Login Welcome Page for s2Member ( even if you're using a Special Redirection URL ), this PHP Constant will hold that value; with the dynamic properties ( i.e. Replacement Codes ) already filled in for the current User/Member.
Thanks Jason for your great work! I was looking for this a long time!
but I got a trouble, Since the PHP Execution plugin been stopped updating so I am using this one:Shortcode Exec PHP. I think what you mean in the instruction is that create a short code with the plugin?
So what I did is that:
1. I copy and pasted the <a href="<?php echo S2MEMBER_LOGIN_WELCOME_PAGE_URL; ?>">My Account</a> into the Shortcodes Field and crates some kind of code snippet with my own customized name as [ clientArea ]
2. I pasted this shortcode [ clientArea ] into Login Welcome Page.
3. Logged in with corresponding user, the [ clientArea ] text just appears straight on the page instead of some kind of link of My Account.
4. I tried to just copy and paste the code into the page directly, shows My Account as a link, but not working.
I wonder is using the PHP Extraction the only way to make this code work, does it means that the plugin still compatible with WP 3.3.1?
This is a pretty key process for the member system, wonder if anyone could help out?
Thanks in advance
*Cristián, I asked same question in the original post but seem not getting any answer for the above question, wonder if you able to answer it at the moment? Thanks~