Page 1 of 1

Personalise Loggin Welcome Page

PostPosted: July 14th, 2010, 6:04 am
by guileshill
Is it possible to get the user firstname to appear in either the page title or the body of the welcome page. I am using an inline php widget but can't seem to get the declaration right to pull that data into the page.

Re: Personalise Loggin Welcome Page

PostPosted: July 14th, 2010, 4:09 pm
by Jason Caldwell
Hi there. Great question.

Yes, you can use one of the s2Member API Constants for this. These are documented in your WP Dashboard, under: s2Member -> API Scripting -> Constants. You will first need the Exec-PHP plugin installed, then you can pop something like this into the HTML tab of your WordPress Editor on ANY Post/Page.

Code: Select all
<?php echo S2MEMBER_CURRENT_USER_FIRST_NAME; ?>

Re: Personalise Loggin Welcome Page

PostPosted: July 15th, 2010, 1:40 am
by guileshill
Thanks Jason, that's much tidier than the bodge that I came up with! Won't show my php code, too embarrassing!

Exec.php is what I used, but this does make a bit of a fuss about disabling the visual editor which can be worked around by using the Deactivate Visual Editor plugin on just the pages with code in the body.

Re: Personalise Loggin Welcome Page

PostPosted: July 15th, 2010, 11:59 pm
by Jason Caldwell
OK great. Thanks for the followup. Much appreciated!

Yea, I agree that Exec-PHP has some side issues. We have a new alternative to Exec-PHP coming soon that will be an attempt to improve upon this plugin. You can look for this to be released at PriMoThemes.com. We're hoping that it will improve the usability of s2Member's API Scripting as well.

~Thanks again.