BP Profile Search › get rid of never active tag
-
AuthorPost
-
jake
Guestis there anyway to get rid of the never active tag that displays in the search results for the users? Ideally it would be replaced with the extended profile summary. Is this possible? How would I do this?
andrea
Plugin AuthorHello Jake,
The search results are displayed by BuddyPress in its Members directory, so the only way to change their display is to modify the BuddyPress Members directory template, see the procedure E) in:
jake
GuestI managed to get rid of the last active tag but can’t seem to add a summary. I see where I need to add it but i’m not sure how. also do I need the shortcode for the custom field titled summary if that’s the field I want to display in the search results?
andrea
Plugin AuthorI guess you modified the file members-loop.php to remove the last activity time. In the same file, look for this code:
<?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' ); */ ?>that explains how to add specific profile fields. After the comment, add:
bp_member_profile_data( 'field=name_of_your_field' );to display that field’s value (add one line for each field you wish to display).
jake
GuestYes I saw that. But. i’m having trouble getting the summary. where do I find the shortcodes/metadata for custom fields?
andrea
Plugin AuthorIf you wish to print the value of a profile field, you only need the name of that field. If the field name is ‘First Language’, you need:
bp_member_profile_data( 'field=First Language' );Did you try that?
jake
Guestjust tried
bp_member_profile_data(‘field=Summary ‘ );
for the field ‘Summary’.
doesn’t work
andrea
Plugin AuthorHi Jake,
If a user didn’t fill the field ‘Summary’, nothing is displayed for that user, so make sure the field has a value or you won’t see anything printed out.
Then, to make sure you added the code in the right place, add an ‘echo’ statement to print something:
<?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' ); */ echo 'the value of Summary is: '; bp_member_profile_data( 'field=Summary' ); ?>You should see at least the output of the ‘echo’ statement.
jake
GuestNo luck. search here and try for yourself. all members have summaries. search ‘publishing’ and the test user should show up with their summary. the user shows up but not the summary. look here.
andrea
Plugin AuthorHi Jake,
If you send me a WP admin and an FTP access, I’ll take a look and I’ll try to fix it. You can send that info privately using my Contact page.
jake
Guestcan i still do this?
andrea
Plugin AuthorYes, of course!
-
AuthorPost