Actually it’s pretty easy to see what profile fields are called in the DB – Check the wp_bp_xprofile_fields table and you’ll have an ID associated with each field which you should be able to use to call them.
it appears the profile fields are being named rather generically…
i.e.
field_1
(first name)
field_2
(xprofile field #1)
field_3
(xprofile field #2)
I need a way to manually call/insert these values… and Im assuming they aren’t named “field_3” in the database
I was hoping if i add an extra field and call it “Referred by” that the DB table name would be “referred_by”
this this a correct presumption?
I have little knowledge of functions and this code has ALOT of them….
You’ll have to modify the member theme functions that display the fields in the profile. That gets generated in: /buddypress-member/profile/profile-loop.php
by the function: bp_the_profile_field_value() in /mu-plugins/bp-xprofile/bp-xprofile-templatetags.php
There’s a filter in there that you can hook: echo apply_filters( ‘bp_the_profile_field_value’, $field->data->value, $field->type, $field->id );
So that you can detect these specific fields and change what gets generated by bp.
I noticed in the wp_bp_xprofile_fields table, there is a column, “is_public”, but I don’t see the templates actually checking for this flag or the admin panel allowing this flag to be set.
I did come across bp_field_has_public_data, so I was wondering if I could just swap out bp_field_has_data for bp_field_has_public_data in the loop, if it would hide profile fields marked as private?