PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Pro login widget hardcoding options

s2Member Plugin. A Membership plugin for WordPress®.

Pro login widget hardcoding options

Postby jeffreygaudette » May 10th, 2011, 7:38 am

Hi all,

I am a pretty basic PHP noob. I need to hardcode the Pro login widget to my theme and change some options. I see the parameters in the APi scripting section, but I don't know how to implement them.

Do the options go into the functions.php or are they hardcoded with the call for the widget. Basically, can you give me an example of what the code would look like to change 3-4 of the options.

For example, how would I include the widget and change the following options:

"title" => "Membership Login"
"signup_url" => "%%automatic%%"
"login_redirect" => ""
"profile_title" => "My Profile Summary"

I apologize again for the very basic question, but I appreciate any help.

Thanks.
User avatar
jeffreygaudette
Registered User
Registered User
 
Posts: 32
Joined: November 4, 2010

Re: Pro login widget hardcoding options

Postby Cristián Lávaque » May 10th, 2011, 1:11 pm

Hi Jeffrey. :)

Those go in the options parameter (an array) when you call the function. E.g.

Code: Select all
$options = array (
    "title" => "Membership Login",
    "signup_url" => "%%automatic%%",
    "login_redirect" => "",
    "profile_title" => "My Profile Summary",
);
echo s2member_pro_login_widget($options); 


I hope that helps.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Pro login widget hardcoding options

Postby jeffreygaudette » May 10th, 2011, 1:43 pm

Argh, I was so close :)

Thank you so much, Cristian! I've never tried to call an array before and I was putting them after the call to the form, not before.

I appreciate your help :)

Jeff
User avatar
jeffreygaudette
Registered User
Registered User
 
Posts: 32
Joined: November 4, 2010

Re: Pro login widget hardcoding options

Postby Cristián Lávaque » May 10th, 2011, 2:12 pm

:)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 2 guests

cron