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.

Problems Custom Fields Buddypress member loop

Home Forums Community Forum Problems Custom Fields Buddypress member loop

This topic contains 3 replies, has 2 voices. Last updated by  Bruce 3 years, 5 months ago.

Topic Author Topic
Posted: Thursday Aug 8th, 2013 at 11:05 am #55424

Hi,

….I´ve red a LOT of postings…:-(

I’ve created different custom fields under “Custom Registration/Profile Fields”:

Unique IDs:
street_address
city_address
telephone_address
birthday

Every Fields and Values are shown in the buddypress profile section of the member

If I add:
$s2member_custom = get_user_field (“street_address”); # Custom String value for the current User.
echo $s2member_custom;

Then the output for every member is: teststreet 1 (The field value of the logged member)

If I add:
$s2member_custom = bp_get_member_profile_data( ‘field=street_address’ );
echo $s2member_custom;

Output: Nothing

If I add:
$s2member_custom = bp_get_member_profile_data( ‘field=Name’ );
echo $s2member_custom;

Output: It shows the members and their names.

How can I display my custom fields? What is wrong?

Thank you!
Cheers
Marco

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Aug 8th, 2013 at 12:17 pm #55425

One more information: I´m using Open Registration and a PayPal Pro-Forms !

Posted: Thursday Aug 8th, 2013 at 3:47 pm #55433

I found the solution:

<?php $theUserID = bp_get_member_user_id();?>
<div id="profile_data">
<ul class="profile_fields">
<li><?php echo get_user_field('street_address', $theUserID);?></li>
<li><?php echo get_user_field('city_address', $theUserID);?></li>
<li><?php echo get_user_field('telephone_address', $theUserID);?></li> 
<li><?php echo get_user_field('birthday', $theUserID);?></li>
</ul>
	</div>
	
Posted: Friday Aug 9th, 2013 at 11:21 pm #55508
Bruce
Username: Bruce
Staff Member

I found the solution:

Cool. Thanks for the info.

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