Search Results for 'hide xprofile fields'
-
Search Results
See https://buddypress.org/forums/topic/faq-how-to-code-snippets-and-solutions, “How to hide selected profile fields” and “How to show secondary profile fields while hiding the “Base” profile fields in a user profile”.
These should get you started and this has been discussed elsewhere on the forums, so do a search.
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.
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS