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.

Show Custom Fields

Home Forums Community Forum Show Custom Fields

This topic contains 5 replies, has 4 voices. Last updated by  Cristián Lávaque 4 years, 3 months ago.

Topic Author Topic
Posted: Wednesday Aug 29th, 2012 at 12:57 am #23373
ben h
Username: wordsmith

Hi all,

Just downloaded the Pro version of s2m…. love it!

Quick issue here…

I created custom fields using s2member so that when new members sign up, they have about 4 more fields to complete in addition to the standard WP fields.

I now want to display these custom fields in a member directory. The plugin I am using for the directory is: http://wordpress.org/extend/plugins/members-list/

I also already read and tried this: http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29

QUESTION:

But for some reason, I cannot get these extra custom fields to display.

Any help is greatly appreciated.

Thanks!

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Wednesday Aug 29th, 2012 at 9:45 pm #23501
Raam Dev
Username: Raam
Staff Member

Hi Ben,

As per our support policy, we don’t offer support for integration with 3rd party plugins.

However, I recommend checking out this thread on extracting Custom Fields via PHP. You should be able to make the necessary modifications to the member directory plugin you’re using so that it also extracts the s2Member Custom Registration Fields.

Posted: Sunday Sep 9th, 2012 at 12:45 am #24677

I’m using the code outline in the page you included in this topic and I’m still having issues displaying a custom field because it’s a multi-select field. Any solutions for this? The only output I get is “Array”

Posted: Monday Sep 10th, 2012 at 7:49 am #24735

If it’s an array, did you try print_r to see what keys you have available?

If you had [hilite code]$array['key'] = 'value';[/hilite] you need to echo [hilite mono]$array['key'][/hilite] (not just [hilite mono]$array[/hilite]) to output “value”.

I hope it helps. :)

Posted: Tuesday Sep 11th, 2012 at 10:23 pm #24957

[member_certification] => Array ( [0] => RM )

Didn’t realize the key I was trying to echo was inside a multidimensional array. Still a newbie. Print_r helped me do a search for the answer. For any other newbies, to echo this, you need to do the following:

<?php $fields = json_decode(S2MEMBER_CURRENT_USER_FIELDS, true); ?>
<?php echo $fields['member_certification']['0']; ?>		

This looks inside the member_certification key for the key that holds the value RM.

Thanks!

Posted: Wednesday Sep 12th, 2012 at 8:18 am #24996

Great! :)

Viewing 5 replies - 1 through 5 (of 5 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.