Forum Replies Created
-
Author
-
newimageindParticipant
Here I added the fourth field:
add_action(‘bp_directory_members_item’, ‘bphelp_dpioml’);
function bphelp_dpioml(){
$bphelp_my_profile_field_1=’State’;
$bphelp_my_profile_field_2=’Ethnicity’;
$bphelp_my_profile_field_3=’Eye Color’;
$bphelp_my_profile_field_4=’Highest Education’;if( is_user_logged_in() && bp_is_members_component() ) { ?>
<div class=”bph_xprofile_fields” style=” margin-left: 0%;”>
<?php echo $bphelp_my_profile_field_1 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_1 ); ?><br />
<?php echo $bphelp_my_profile_field_2 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_2 ); ?><br />
<?php echo $bphelp_my_profile_field_3 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_3 ); ?><br />
<?php echo $bphelp_my_profile_field_4 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_4 ); ?><br /></div><?php
}
}On the screen it only show the first three, not the fourth.
Thanks!
Attachments:
You must be logged in to view attached files.newimageindParticipantThanks Laura, two more questions,
1. Is there a way to change the font color and style of the age? for example under “Stephanie”, her age is show as “22”.
2. I use the following code to display extra information on the members page:add_action(‘bp_directory_members_item’, ‘bphelp_dpioml’);
function bphelp_dpioml(){
$bphelp_my_profile_field_1=’State’;
$bphelp_my_profile_field_2=’Ethnicity’;
$bphelp_my_profile_field_3=’Eye Color’;if( is_user_logged_in() && bp_is_members_component() ) { ?>
<div class=”bph_xprofile_fields” style=” margin-left: 0%;”>
<?php echo $bphelp_my_profile_field_1 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_1 ); ?><br />
<?php echo $bphelp_my_profile_field_2 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_2 ); ?><br />
<?php echo $bphelp_my_profile_field_3 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_3 ); ?><br /></div><?php
}
}however if I add more than 3 fields, the rest will not show on the page. how can I fit one or two more lines of data in there?
Thank you!
September 18, 2015 at 02:18 in reply to: Remove a couple things on directory page and profile page #78303newimageindParticipantThat worked, thank you!
September 14, 2015 at 20:01 in reply to: Giving admin/moderator permission to upload photo and video for users? #77639newimageindParticipantThank you.
newimageindParticipantrestrict content does not work for me for some reason, however I found a work around that syncs wordpress role with PMpro levels.
So Problem Solved.
Thanks. -
AuthorPosts