Page 1 of 1

Custom Menu Item using s2member Custom Field value

PostPosted: December 28th, 2011, 12:23 am
by TheresaBug
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?

Re: Custom Menu Item using s2member Custom Field value

PostPosted: December 29th, 2011, 4:24 am
by Cristián Lávaque
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. :)

Re: Custom Menu Item using s2member Custom Field value

PostPosted: December 29th, 2011, 5:34 am
by TheresaBug
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.

Re: Custom Menu Item using s2member Custom Field value

PostPosted: December 29th, 2011, 3:09 pm
by Raam Dev
Thank you for reporting back and I'm glad to hear you got it fixed. :)

Re: Custom Menu Item using s2member Custom Field value

PostPosted: December 29th, 2011, 11:46 pm
by Cristián Lávaque
That's cool. I'm glad you got it working. :)