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™

Custom Menu Item using s2member Custom Field value

s2Member Plugin. A Membership plugin for WordPress®.

Custom Menu Item using s2member Custom Field value

Postby TheresaBug » December 28th, 2011, 12:23 am

We are developing a multisite install using s2member Pro and s2clean theme.

There is one main site, and then each program has its own subdomain. We have created a custom registration field (drop down, single select) called "program" to designate which program users belong to.

What we would like to do:

On the root site, have a menu item that redirects the user to their program's subsite using the value of this custom registration field. The value of the custom field only needs to be retrieved and tacked on to the end of the home url.

I have successfully done this within a page, using php to construct the link. However I don't know how to just make it one menu item that changes according to the current user. (If you are familiar with the plugin PageLinksTo, it would sort of work like that, only it would change according to the current user.)

Any ideas?
User avatar
TheresaBug
Registered User
Registered User
 
Posts: 8
Joined: November 3, 2011

Re: Custom Menu Item using s2member Custom Field value

Postby Cristián Lávaque » December 29th, 2011, 4:24 am

I'm still not sure what you're trying to do, but if you need to get the program the user picked in that custom field, then you can use the get_user_field function. viewtopic.php?f=40&t=12453&src_doc_v=111105#src_doc_get_user_field%28%29

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: Custom Menu Item using s2member Custom Field value

Postby TheresaBug » December 29th, 2011, 5:34 am

Sorry to not report back. I did get this working using the s2clean hack file and a few other tricks. These things are so customized, it is hard to explain in a few short sentences.

Thank you anyway for the reply.
User avatar
TheresaBug
Registered User
Registered User
 
Posts: 8
Joined: November 3, 2011

Re: Custom Menu Item using s2member Custom Field value

Postby Raam Dev » December 29th, 2011, 3:09 pm

Thank you for reporting back and I'm glad to hear you got it fixed. :)
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Custom Menu Item using s2member Custom Field value

Postby Cristián Lávaque » December 29th, 2011, 11:46 pm

That's cool. I'm glad you got it working. :)
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: No registered users and 3 guests

cron