Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-01T20:28:48-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16132 2011-12-01T20:28:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16132&p=54340#p54340 <![CDATA[Re: My account link]]> Have a great holiday season!

Statistics: Posted by Raam Dev — December 1st, 2011, 8:28 pm


]]>
2011-12-01T09:17:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16132&p=54310#p54310 <![CDATA[Re: My account link]]>
Great help and have a good holiday season.

Chris

Statistics: Posted by defeyter — December 1st, 2011, 9:17 am


]]>
2011-12-01T01:44:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16132&p=54286#p54286 <![CDATA[Re: My account link]]>
Under WP Admin -> s2Member -> API/Scripting -> s2Member PHP/API Constants, you'll find this bit:

S2MEMBER_CURRENT_USER_LOGIN
This will always be a (string) containing the current User's Username. Empty if not logged in.

<?php echo S2MEMBER_CURRENT_USER_LOGIN; ?>
This may output something like: johnsmith22
( or whatever their login/username is )

---- s2member Shortcode Equivalent ----

[s2Get constant="S2MEMBER_CURRENT_USER_LOGIN" /]


So, if you were on a WordPress Page, you could construct a My Account link using something like this:

Code:
<a href="/members/[s2Get constant="S2MEMBER_CURRENT_USER_LOGIN" /]/profile/">My Account</a>


or, if you wanted to do it with PHP from a template file:

Code:
<a href="/members/<?php echo S2MEMBER_CURRENT_USER_LOGIN; ?>/profile/">My Account</a>


Does that answer your question?

Statistics: Posted by Raam Dev — December 1st, 2011, 1:44 am


]]>
2011-11-30T15:13:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16132&p=54248#p54248 <![CDATA[My account link]]>
If I want the My Account link (or welcome page link) to be displayed on a page and not in a sidebar, which code would I put in? Every client has their own page, based using %%current_user_login%% as welcome page.

I have looked on this forum and in the docs, but I cannot find it.

Thanks,
Chris de Feijter
S2Member Pro user.

Statistics: Posted by defeyter — November 30th, 2011, 3:13 pm


]]>