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™

Search users for custom field

s2Member Plugin. A Membership plugin for WordPress®.

Search users for custom field

Unread postby nemoprincess » October 25th, 2011, 3:58 pm

Hello, I have added several custom fields to users' registration. Now I need to search my user and list them if they have a particular custom value for custom field.

How can I achieve it? I can recover the custom field from the wp_s2member_custom_fields meta_key?

Thanks a lot.
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Search users for custom field

Unread postby Jason Caldwell » October 26th, 2011, 2:08 pm

~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/
Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a ( comes in handy ). Then Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Search users for custom field

Unread postby nemoprincess » November 9th, 2011, 3:50 pm

User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Search users for custom field

Unread postby Jason Caldwell » November 9th, 2011, 5:18 pm

~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/
Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a ( comes in handy ). Then Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Search users for custom field

Unread postby nemoprincess » November 9th, 2011, 7:19 pm

Hi Jason, thanks to you, you' re right. I took the code from somewhere and I tried it, maybe your code works but I would like to order them by their level I would like to see the premium users on the top of my user list.
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Search users for custom field

Unread postby epixmedia » November 22nd, 2011, 7:29 am

User avatar
epixmedia
Registered User
Registered User
 
Posts: 59
Joined: November 15, 2011

Re: Search users for custom field

Unread postby Jason Caldwell » November 22nd, 2011, 12:35 pm

~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/
Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a ( comes in handy ). Then Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Search users for custom field

Unread postby epixmedia » November 23rd, 2011, 12:09 pm

Hi Jason, thanks again for the help - that's worked an absolute treat! Are you able to direct me to a post/documentation that explains how to include paging? My member database is going to be about 1000 so I don't fancy loading it all on to one page!

Cheers :)

Zoe
Last edited by epixmedia on December 5th, 2011, 9:52 am, edited 1 time in total.
User avatar
epixmedia
Registered User
Registered User
 
Posts: 59
Joined: November 15, 2011

Re: Search users for custom field

Unread postby Jason Caldwell » November 23rd, 2011, 1:28 pm

~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/
Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a ( comes in handy ). Then Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot] and 3 guests

cron