latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Short code conditionals and custom fields

Home Forums Community Forum Short code conditionals and custom fields

This topic contains 1 reply, has 2 voices. Last updated by  Bruce 3 years, 8 months ago.

Topic Author Topic
Posted: Thursday Apr 25th, 2013 at 9:52 am #48362

Hi
Would it be possible to use short codes to pull all data in a specific custom field for all members in the database?

The client has a custom field for “student”.

Could short codes be used to return the value true (1) for
a. every member – list of names
b. all members – aggregate, no names just a total number

that have checked this box?

If yes, could someone write an example of how to do it?

The fields are on the form at this url: http://vetkuws.com/membership-signup-2/

Hope this is clear enough. Thanks for any help you can send my way.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Friday Apr 26th, 2013 at 1:13 am #48424
Bruce
Username: Bruce
Staff Member

Could short codes be used to return the value true (1) for
a. every member – list of names
b. all members – aggregate, no names just a total number

Yes. If you use the s2Get shortcode, or alternatively the get_user_field() function, s2Member will return 1 if a checkbox is checked.

See: Knowledge Base » Simple Shortcode Conditionals

See Also: http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field()

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.