-
Author
-
April 13, 2015 at 23:50 #54299kheopsarohnParticipant
Hi,
I would like to display extra field on the members page. The plugins BuddyPress Xprofile Custom Fields Type and Gravity Forms have been installed.
If i understood well, i have to put some codes after :
<?php
/***
* If you want to show specific profile fields here you can,
* but it’ll add an extra query for each member in the loop
* (only one regardless of the number of fields you show):
*
* bp_member_profile_data( ‘field=the field name’ );
*/?>
It’s what i’ve done. I’ve tried three different ways :
First way :
<?php if ( bp_get_member_profile_data( ‘field=ttt’) ) : ?> /* ttt is an example of field.*/
<?php bp_member_profile_data( ‘field=ttt’ ); ?>
<?php endif; ?>Second way :
<?php $user_ID = bp_get_member_user_id(); ?>
<?php if ( xprofile_get_field_data( ‘ttt’, $user_ID ) ) : ?>
<?php echo ‘<br /><span class=”item-meta”>test:</span> ‘; ?>
<?php echo xprofile_get_field_data( ’ttt’, $user_ID ); ?>
<?php endif; ?>Third way :
<?php bp_member_profile_data( ‘field=ttt’) ?>
Neither of them work.Have you an idea of how can i do ? Thanks for your help and reply. Cheers
April 13, 2015 at 23:54 #54300sharmstrModeratorThose work. The times that people have had issues displaying the fields all ended up being plugin conflicts. Do a search here. Its been discussed and sample code has been provided.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.