Search Results for 'profile fields'
-
Search Results
-
How do I get custom profile fields that I add to user registration to appear in the notification email to the admin? Right now I just get username and email? I want to see the custom (optional) field if they fill it out.
Hello,
What is the proper way to display dropdown profile field data in other places like the profile header?
Here’s what I’ve written so far (works with text fields and checkbox fields):
add_filter( 'bp_do_register_theme_directory', '__return_true' ); function my_directory() { if ( bp_is_active( 'xprofile' ) ) if ( $memberRoles2 = xprofile_get_field_data( 'Starting', bp_get_member_user_id() ) ) : echo '<h5 class="adneed">'; echo '<span class="adneedcontent">'; echo 'starting'; echo '</span>'; foreach ( $memberRoles2 as $memberRoles2 ) { echo '<div class="roles">'; echo $memberRoles2; echo ', </div>'; } echo '</h5>'; endif; add_filter ( 'bp_directory_members_item', 'my_directory' );This is the error I get:
Warning: Invalid argument supplied for foreach() in /home/tvfilmpa/staging/2/wordpress/wp-content/plugins/bp-custom.php on line 139
Any help regarding this issue is greatly, greatly appreciated!
Hey!
I’d like to change the h1 contents of the members (by default, first name and last name are being displayed). Ideally I’d like to replace these first and last names by specific profile fields.In this post, I got on how to do so for any part below the h1 tag (through the copy of the BP templates and the modification of the member-header.php).
Yet it doesn’t work for modifying the h1 content itself.
Please help me 🙂Cheers,
Laurent
Hi,
I’ve created a series of profile field groups for different user types. There is one for a rider (Base), event organizer and finally a business user.
Currently im using the ‘BuddyPress Conditional Field Groups’ plugin to hide and show the event organizer and business groups based on the user but the Rider(Base) panel is there for all 3 user types.
Is there anyway to to hide the base panel based on the user either through coding or through the above plugin. Alternatively is there another plugin we could use?
I’ve created a custom field (Checkboxes) in WordPress > Users > Profile Fields. My site is an omni site for news, so it collects news from 20 different sources via RSS, and adds them ass posts in my WordPress site. This is how my custom field looks like:

enter image description hereIf you’re only a visitor on my front page I’ll show all posts on the startpage.
If you are a logged in user; then you should be able to select and save wich of the 20 sources you want to read in your startpage on my site. This is possible to select and save today, but only from BP User Settings page:

Select and Save sources from BP User SettingsNow, the issue with the Users Profile Settings page is:
a) I do not want to have the form in the tab “Profile > Edit”. I want my form on my startpage (above the news flow, for logged on users of course) and perhaps in a widget sometime – anyhow – the most important this is freedom to place (and style) the form wherever I want.
b) The form includes fields I want to remove (Name and Description, i.e. “sources” = field name) etc.
The user on the image above has selected and saved to read news from 2 different sources on my website. The code that handles this is on the startpage in my index.php is:
$sources = xprofile_get_field_data( 'sources', $current_user_id, $multi_format = 'array' ); query_posts(array('category__and'=>array($sources)));Question: Is there a way of retrieving this form and update in from anywhere for logged in users? I don’t want to be bound to the idea of only having the form in the Profile Settings page. I want the user to have to form above my news flow on the startpage of my site, so the users gets the feeling of “Oh, I can customize my news flow if I create an account!” – and this should be done from anywhere for logged in users.
Hello,
I’m trying to display x profile fields underneath the member header. Checkbox data displays perfectly. Drop-downs and strings aren’t displaying. Here’s the code:
if ( $memberRoles = xprofile_get_field_data( ‘AD Roles’, bp_get_member_user_id() ) ) :
foreach ( $memberRoles as $memberRoles ) {
echo ‘<div class=”roles”><h5>’;
echo $memberRoles;
echo ‘, </h5></div>’;
}
endif;Any information about how to display drop-downs and strings using xprofile_get_field_data is greatly appreciated.
Thank you!
Hello,
Looking to request a feature for the xProfile fields, if this isn’t the right place to make sure a request can someone point me in the right direction.
I would love the xProfile classes be updated so the field labels are filterable, in my case this would be useful so I can replace the standard (required) denotation specifically when the xProfile field is included on the WooCommerce Checkout form to utilize the standard woocommerce asterisk (*) denotation.
The concept comes from the custom xProfile classes created by @donmik for the Buddypress Xprofile Custom Fields Type plugin;
https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/My specific implementation where the Xprofile fields are incorporated onto the Woocommerce Checkout form comes with the tandem implementation of the paid and free plugins by themekraft
Paid Primary – http://themekraft.com/store/woocommerce-buddypress-integration-wordpress-plugin/
Free Addon – https://wordpress.org/plugins/woocommerce-buddypress-integration-xprofile-checkout-manager/
Together these include the Xprofile fields onto the Checkout, however they don’t quite match with the Woocommerce fields so I had to add classes to them (currently capable through the bp_xprofile_field_edit_html_elements filter) and want to replace the (required) in the label with the appropriate asterisk.My current workaround involves jQuery to do the label replace, but I would prefer a label filter.
/** * Add Javascript to replace Buddypress (required) with Woocommerce required asterisk (*) */ add_action('woocommerce_after_checkout_form', 'wc4bp_woo_replace_required_for_xprofile_checkout_fields'); function wc4bp_woo_replace_required_for_xprofile_checkout_fields() { echo '<script>jQuery(document).ready(function($){$(".wc4bp_custom_checkout_fields_group label").each(function(i){$(this).html($(this).html().replace("(required)","<abbr class=\"required\" title=\"required\">*</abbr>"));});});</script>'; }An example how @donmik implemented a label filter for his custom Xprofile fields;
$label = sprintf( '<label for="%s">%s%s</label>', bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), (bp_get_the_profile_field_is_required()) ? ' ' . esc_html__( '(required)', 'buddypress' ) : '' ); // Label. echo apply_filters('bxcft_field_label', $label, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required());Hoping this is the right channel for this request, otherwise hoping someone can point me to it. Or if the plugin is available on github would be happy to make a fork request and code the change myself.
Thank you
BuddyPress Version 2.3.2.1
WordPress Version 4.2.3
Theme: Nirvana Version 1.1.0The group description for all groups is a medium shade of grey. It is somewhat readable to a degree, but I would prefer to change the color to black instead. I noticed some existing topis where people mentioned about profile fields or the font being too large, but I did not stumble upon changing the color. If desired I can post a link to the .css coding if that would be beneficial. Basically what am I looking for in the .css file and how do I resolve it?
Note: I would rather avoid building a child theme due to my lack of knowledge on the matter. Sure it would be a little incontinence when I have to upgrade my theme, but at least I can paste the answer back in the .css file.
How would I go about incorporating Ajax filters in the members loop based on XProfile Fields? For example, I know that some XProfile fields are just textboxes, but I’m more looking to make a filter out of dropdown boxes. If I have one of my filters to be Sport: and I have Football, Baseball, etc. each of those being an option in a XProfile dropdown box. The filter search must also take multiple criteria, i.e. multiple dropdown boxes.
Thanks in advance.
Hello,
I am using the latest buddypress and wordpress. I have a number of Profile Group fields and would like to change from a Tab navigation to a Dropdown Select in the edit field.
I am new to code but have found
<?php if ( bp_profile_has_multiple_groups() ) : ?>
<ul class=”button-nav”>I am guessing that changing the class will change the button (tab) type to a dropdown. I have no idea on what is required on this though. I want to do this in a few areas, but first of all in the edit profile area.
Any help gratefully received.
Thanks
Hello,
I am trying to get fields that are on the Your Profile admin screen to display on the front facing profile page so users don’t require access to the admin screens.
I am using Event Manager who create custom fields but they put them on core Your Profile rather than the extended Base profile which means they are not accessible to user on the front end to modify.
Is there any way to have fields from that admin page display on the profile page?
Thanks
Hello,
I’m utilizing the Woocommerce Buddypress Integration with the additional xProfile Checkout Manager, referring to these plugins;
Woocommerce Buddypress Integration (PAID) – http://themekraft.com/store/woocommerce-buddypress-integration-wordpress-plugin/
xProfile Checkout Manager (FREE) – https://wordpress.org/plugins/woocommerce-buddypress-integration-xprofile-checkout-manager/In the xProfile Checkout Manager they’re creating a $field object using BP_XProfile_Field as follows;
$field = new BP_XProfile_Field( $field_id );If I var_dump the object I noticed that no matter what kind of field it is it always states the type is web….
object(BP_XProfile_Field)#4428 (16) { [“id”]=> string(2) “19” [“group_id”]=> string(1) “5” [“parent_id”]=> string(1) “0” [“type”]=> string(3) “web” [“name”]=> string(21) “Work Province / State” [“description”]=> string(0) “” [“is_required”]=> string(1) “0” [“can_delete”]=> string(1) “1” [“field_order”]=> string(1) “6” [“option_order”]=> string(1) “0” [“order_by”]=> string(0) “” [“is_default_option”]=> string(1) “0” [“default_visibility”]=> string(6) “public” [“allow_custom_visibility”]=> string(7) “allowed” [“type_obj”]=> object(BP_XProfile_Field_Type_Textbox)#4430 (8) { [“validation_regex”:protected]=> array(1) { [0]=> string(6) “/^.*$/” } [“validation_whitelist”:protected]=> array(0) { } [“name”]=> string(8) “Text Box” [“category”]=> string(13) “Single Fields” [“accepts_null_value”]=> bool(false) [“supports_options”]=> bool(false) [“supports_multiple_defaults”]=> bool(false) [“field_obj”]=> *RECURSION* } [“data”]=> NULL }
Why is this? Shouldn’t it indicate what type of xProfile field it is? I was hoping to use this to indicate it was an email to woocommerce for it’s validation.
Any help in finding the posts true type appreciated.
Thanks
Hi everyone,
I would like to know how to have diferent types profile with diferents fields for each profile type, Is this posible?
In example, I would like to have a profile type Runner with fields like 100 metters and other like Sailor with fields like 10 miles.Thanks for help.
I’m adding profile fields to the profile header using this function:
add_action( ‘bp_before_member_header_meta’, ‘display_user_phone’);
function display_user_phone() {
// echo ‘I choose this color: ‘;
$args = array(
‘field’ => ‘AD Roles’,// Field name or ID.
);$args2 = array(
‘field’ => ’16’,// Field name or ID.
);echo ‘<h5>’;
echo bp_member_profile_data( $args );
echo ‘</h5>’;
echo ‘<h5>’;
echo bp_member_profile_data( $args2 );
echo ‘</h5>’;
}However, when I attempt to use the field ID, it doesn’t display the profile information. Using the Field Name works perfectly. I need to access the ID b/c some of the Field Names are long and involve punctuation.
How do I enter the field ID to make this work?
Thank you!
Using WordPress V. 4.2.3 and BuddyPress 2.3.2.1
I am running a multisite on theathleticgrade.com (master) with sub sites being theathleticgrade.com/coaches (and reflecting coaches fields ONLY) and theathleticgrade.com/students(and reflecting students fields ONLY) from the extended fields. Before adding the code to segregate the tables for the X-Profile Fields, both coaches and students fields were showing up on all sub sites. I need coaches to ONLY show up on theathleticgrade.com/coaches, etc.
I then created a file called bp-custom.php and loaded it with code, then uploaded that directly to the plugins folder. The code was copied and pasted from this link: https://codex.buddypress.org/themes/guides/segregated-x-profile-fields-for-multisite – NO MODIFICATIONS were made.2 things happened:
1. In the back end and on both sub sites – the profile fields groups and their content disappeared. – Which is fine. BUT–when I made the attempt to add a new field group, I kept getting an error message:
There was an error saving the group. Please try again..
2. I created a temporary sub site to see how it would react and same thing, along with these error messages referring to the code I just added and uploaded:
My question is..what do I need to do to create the groups in the coaches and students dashboards, so that they can be displayed appropriately on either website?
Was there something that needed to be manipulated within the code? If so, what is the exact location and where do I pull the information from? Specific instructions are essential, so that there is not any misunderstandings. Is there an example that can be provided on a live test website?
I’ve copied members-loop.php into my child theme (child theme > buddypress > members > members-loop.php).
As instructed by the comments in this file, I added bp_member_profile_data( ‘field=Phone’ ); directly under the comments. However, the profile field doesn’t show up on the members directory page.
Is there a crucial step I’m missing? Am I going about this the wrong way?
Any help is greatly, greatly appreciated.
I don’t want every field to be linkable. How would I go about this?
I am no code expert.
WordPress: 4.2.3
BuddyPress: 2.3.2.1I am using News Pro powered by Genesis. The theme and Genesis is created Studiopress.
Link to profile: http://whateverisonyourmindllc.com/voice/members/wchl23/