-
Author
-
November 14, 2018 at 06:51 #213408darunia77Participant
Hi guys. I would like to modify the code below so I can also add this to my Group Members directory. Currently I have this for Members directory. Can you please change the function, I couldn’t figure it out myself what the directory is called in php. Thank you.
COPY CODE/* Add extra fields to member directory */ function sq7_extra_fields_members_directory() { $age = bp_get_member_profile_data('field=Age'); $city = bp_get_member_profile_data('field=City'); $stateorprovince = bp_get_member_profile_data('field=State or Province'); $country = bp_get_member_profile_data('field=Country'); $ldr = bp_get_member_profile_data('field=Open to LDR?'); if ($age || $city || $stateorprovince || $country || $ldr) { echo '<div class="mdetcenter">'. 'Age : ' . $age . '</div>'; echo '<div class="mdetcenter">'. 'City : ' . $city . '</div>'; echo '<div class="mdetcenter">'. 'State or Province : ' . $stateorprovince . '</div>'; echo '<div class="mdetcenter">'. 'Country : ' . $country . '</div>'; echo '<div class="mdetcenter">'. 'Open to LDR : ' . $ldr . '</div>'; } }
November 14, 2018 at 06:53 #213409darunia77ParticipantSorry, missing part of code. The whole code is:
/* Add extra fields to member directory */
function sq7_extra_fields_members_directory() {
$age = bp_get_member_profile_data(‘field=Age’);
$city = bp_get_member_profile_data(‘field=City’);
$stateorprovince = bp_get_member_profile_data(‘field=State or Province’);
$country = bp_get_member_profile_data(‘field=Country’);
$ldr = bp_get_member_profile_data(‘field=Open to LDR?’);if ($age || $city || $stateorprovince || $country || $ldr) {
echo ‘‘. ‘Age : ‘ . $age . ‘‘;
echo ‘‘. ‘City : ‘ . $city . ‘‘;
echo ‘‘. ‘State or Province : ‘ . $stateorprovince . ‘‘;
echo ‘‘. ‘Country : ‘ . $country . ‘‘;
echo ‘‘. ‘Open to LDR : ‘ . $ldr . ‘‘;
}
}
add_action(‘bp_directory_members_item’, ‘sq7_extra_fields_members_directory’);
November 15, 2018 at 17:56 #213460LauraModeratorHello, you would need to hire a developer to customize the code for you as we do not provide custom development
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
November 20, 2018 at 18:46 #213787LauraModeratorLet me know if you need anything else 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.