Skip to:

Search Results for 'profile fields'

Viewing 25 results - 1 through 25 (of 4,674 total)
  • Author
    Search Results
  • #253795
    Profile photo of drumhead


    I am new to WordPress and Buddypress and have been having trouble figuring this out.

    I want to search for users by their BP xProfile using the check box fields combined with their location. The goal is for a user to be able to select someone with a specific criteria (check boxes) and then by zip code or the name of the city state.

    I see location as an option when making new fields but really like xProfile Location Version 1.0 and how it autofills the location with either zip or city state. Can this be used in conjunction with the location fields?

    And can both of these (checkbox and location) be requested with one request?

    WordPress 4.5.2 running Athena Child theme
    BP Profile Search Version 4.5.2
    xProfile Location Version 1.0


    Profile photo of mcpeanut

    @insearchofasolution Just thought I would chime in on this.

    You would be able to do this but it depends on the approach you take, You could use buddypress for the social network side of things for the messaging between users etc and profile pages/groups etc whilst building a custom user interface for most of the other options you mentioned and tie them together for each user.

    Its good you are clear about what you are exactly wanting to build and its all down to research, You can most definitely create separate vendor pages and account pages using custom post types and fields and creating templates for these pages etc.

    If you don’t know how to do all of this you may struggle though, unless a specific plugin meets your requirements, I myself have been using an amazing suite of plugins over the past year or so that will help you do a lot of this yourself , they are brilliant for creating complex websites and layouts without having to write everything from scratch. You will have to have knowledge of html and css etc at the very least to use them efficiently though, they do come at a cost and you are looking at $300 for the complete set, these plugins are a little more advanced than other plugins to use as they are developer orientated and can be overwhelming at first if you are new to them, but if you stick with them you will start to realize the doors these plugins can open for you on wordpress and can help make your workflow loads faster and make your project come to life. do a search for TOOLSET PLUGINS by wp-types.

    I hope this helps a little bit, creating a complex website as you mentioned above will take patience and time if you are new to doing it, I am in the middle of a few complex builds myself and to be honest with you I now pre-fare to use these plugins for most of my projects now as I can easily create any type of custom post with custom fields and display them via content templates without having to create the templates from scratch on each project.

    The best thing about the custom fields you can create with these plugins is that you can create user specific fields and control access to everything with the access plugin, giving you full control over everything and you can create quite complex membership sites yourself.

    Profile photo of danbp

    Most of bp files are in php, so i can’t answer for YOUR php file.

    I you modify the register page, where xprofile fields are showing at first, the template file i’m talking about is in bp-templates/bp-legacy/buddypress/members/register.php.

    If you don’t know about template overload, read here first.

    Or if you use a custom function to fire your work via an action hook, perhaps you could try to use bp-custom.php

    Profile photo of ekko848

    I am trying to create a function in bp-custom.php where if a user inputs data into a profile field, another field is automatically set to “Pending” (from empty).

    I know I have to use xprofile_get_field_data to determine the field I wish to determine is empty or not empty.
    Then use an if statement along with xprofile_set_field_data to input the word or option to insert if this field is not empty (!empty).

    function profile_stream ( $user_id ) {
        $streamid = xprofile_get_field_data( 10, $user_id );
        if (!empty($streamid)) {
            xprofile_set_field_data( 11, $user_id, "Pending");

    MySQL table numbers for wp_bp_xprofile_fields are ’10’ and ’11’ as reflected in the code.

    Any tips on how to get this working?

    Profile photo of danbp

    That’s unfortunately what i expected… GF is a third party premium plugin for which nobody can help you here, except if he/she use that plugin.

    If you read here, it’s somehow explained in details.

    What you already used (gform_field_value_linkuser), linkuser is a GF field name. If i’m right, see the advanced tab of that field and complete the name parameter.

    Here a snippet which let you see how to link a username to his profile, when you’re outside of the member_loop. It will output the current user name on the site wide activity header. For test only.

    Note that it use BuddyPress default Name field and that it comes from a BP form. As you use GF, you certainly need to find how to grab properly a GF field value.

    Function goes to bp-cutom, may also work in theme’s functions.php

    function bpfr_my_profile_link_on_SWA_header () {	
    	$user_id = get_current_user_id();
    	$profile_url = bp_loggedin_user_domain();
    	if( !is_user_logged_in() ) {
    	echo '<br>Test userlink:&nbsp;'; 
    	if ( !$data = bp_get_profile_field_data( 'field=Name' ) ) : 
    		echo xprofile_get_field_data( 'Name', bp_get_member_user_id() ) .'<a href="'. $profile_url .'">'. bp_core_get_username( $user_id ).'</a><br>';
    add_action( 'bp_activity_type_tabs', 'bpfr_my_profile_link_on_SWA_header' ); 

    Sorry, I can’t help you more.

    Profile photo of navyspitfire

    Thank you. However, this only returns the value. How would I return the field name/label associated with that value?

    Updated block:

    $this->tabs_instance->fields_data[$name] = '<dt class="bp-field-name bp-field-id-' . bp_get_the_profile_field_id() . '">'. bp_get_the_profile_field_name().'</dt>';
    $this->tabs_instance->fields_data[$name] = '<dd class="bp-field-value bp-field-id-' . bp_get_the_profile_field_id() . '">'. xprofile_get_field_data( 'Eye Color', bp_displayed_user_id() ) .'</dd>';
    Profile photo of navyspitfire

    I have the code below which prints out every field+value that a member has filled in. I am trying to only display select field+value fields, but my first attempt failed and I’m not sure how to reference the fields.

    First attempt (182, aka field_182):

    Code block:

    $this->tabs_instance->has_data[$name] = true;
    $this->tabs_instance->fields_data[$name] .= '<dt class="bp-field-name bp-field-id-' . bp_get_the_profile_field_id() . '">'. bp_get_the_profile_field_name().'</dt>';
    $this->tabs_instance->fields_data[$name] .= '<dd class="bp-field-value bp-field-id-' . bp_get_the_profile_field_id() . '">'. bp_get_the_profile_field_value().'</dd>';
    Profile photo of GunnyRet

    When users try to register they are seeing a field that shows “admin (required) on the signup.

    I have tried to go to users, profile fields to delete this Base Primary, but all I seem to have the ability to do is change the title. I also can’t change the visibility to no one instead of everyone.

    Thanks in advance for any help.

    Sorry WP 4.5.2
    BP 2.5.2

    Profile photo of danbp

    Perhaps this can help you to go further.

    For point 2, maybe this snippet can do the job. Give it a try ! Add it to bp-custom.php

    function custom_display_xprofile_fields() {
    // single field item
    if ( $data = bp_get_profile_field_data( 'field=Industry' ) ) : // change field name to yours
    	echo '<div class="industry">'. xprofile_get_field_data( 'Industry', bp_displayed_user_id() ) .'</div>';
    add_action( 'bp_after_profile_loop_content' , 'custom_display_xprofile_fields' );

    In reply to: Import profile fields?

    Profile photo of sharmavishal

    dont think so…just export the 4 xprofile fields rows form the db via phpmyadmin and import them back

    Profile photo of markyeoj


    I’m working on the visibility of my profile fields but I am not sure how it really works so I have some questions.

    1. I want some profile fields to be visible to some specific user role. But allow the users of that role to set the visibility of the value of the field.

    For example, a long text field visible only for editors and admins. But allow them to set the value’s visibility if they want to share it to their friends or public or private. Is this possible?

    2. I have a profile field only visible for admin meaning only admin can see that profile field, but I want the value of that field visible to all. Is this possible?


    Profile photo of nnyorker

    Hi there – any way to import profile fields? I was using another member plugin and decided to switch to BP.

    Profile photo of modemlooper

    any profile fields you add to the first field group get added to the registration form.

    Profile photo of bennypowers
    Benny Powers

    I’m using WPMUDEV’s Membership 2 Pro plugin. I’d like to add XProfile fields to the registration form. Here’s my attempt:

    add_action('signup_extra_fields', 'igi_change_reg_fields');
    function igi_change_reg_fields() {
      if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile() ) : while ( bp_profile_groups() ) : bp_the_profile_group();
      echo '<input type="hidden" name="'.bp_the_profile_field_input_name().'" id="'. bp_the_profile_field_input_name().'" value="'. bp_the_profile_field_edit_value().'"';
       endwhile; endif; endif;

    This produces:

    Warning: Creating default object from empty value in /home/bennyp5/public_html/ on line 520

    Please help me to understand where I’m going wrong.


    Profile photo of bennypowers
    Benny Powers

    I have a Multisite installation with BuddyPress. I’d like to display user’s extended profile fields in the site directory (blog loop)

    Based on the documentation, I’ve tried this:

    add_action( 'bp_directory_blogs_item', 'display_user_xprofile' );
    function display_user_xprofile() {
        $args = array(
            'field'   => 'Phone', // Field name or ID.
            // 'field'   => 'Car', // Field name or ID.
            // 'field'   => 'Languages', // Field name or ID.
        $phone_number = bp_get_profile_field_data( $args );
        if ($phone_number) {
            echo 'Phone Number: ' . $phone_number;
            // echo 'Car?: ' . $phone_number;
            // echo 'Languages: ' . $phone_number;

    Without success. Please advise how to display this info.

    Profile photo of prdufresne

    I was able to override the offending settings by adding a few lines in the custom css file of my theme. Below are the changes I made to resolve the issue, in case anyone else runs into a similar problem

    #buddypress table.profile-fields td.label {
        color: #555555;
        display: table-cell;
    Profile photo of justarandomuser

    I just found a little problem on my website.
    As an admin I can edit directly on the Front-End the profiles of my users if there is bad data.

    I show the fields like this (I have only 1 group):

    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    // many things are going on here! but nothing special
    <?php enwhile; ?>

    The problem is… EMPTY fields are not in the output!

    I tried to put array('hide_empty_fields' => 0) into bp_the_profile_field() but this doesn’t work.

    I handle everything (display of the profile, editing of the profile fields etc) in <my-theme>/buddypress/members/single/cover-image-header.php

    Please help me ๐Ÿ™

    Profile photo of prdufresne

    We just installed BuddyPress on our website, and I’m having an issue with the color scheme that came up by default.

    On the member profile page, where it lists the field data, the column that is supposed to show field labels isn’t rendering correctly. It’s putting a border around the text (not the cell label, a separate text border offset from the cell), the text is being rendered in white and the background of the label is matching the background of the cell adjacent to it, but the cell itself remains white when the field data background is lightly shaded.

    By inspecting the element, I think I’ve figured out that the font color and border are being applied by bootstrap.min.css which appears to be part of the magee-shortcodes plugin and the funky text position is being applied by buddypress.min.css.

    Here’s the code from the bootstrap.min.css file:

    .label {
        display: inline;
        padding: .2em .6em .3em;
        font-size: 75%;
        font-weight: 700;
        line-height: 1;
        color: #fff;
        text-align: center;
        white-space: nowrap;
        vertical-align: baseline;
        border-radius: .25em;

    Is there an easy way for me to override these? I just don’t know where to make the change.


    Profile photo of navyspitfire

    I’ve removed the “upload avatar” area from my registration page and instead am using the profile fields “upload photo” field. I’d like the single members page to use the photo uploaded as their avatar.

    I’m using the Sweet Date theme and in the single members theme file is the hook <?php bp_displayed_user_avatar( array('type' =>'full','width' => 580, 'height' => 580) ); ?>. Does anyone know the hook for me to use the image the user uploads via the “upload photo” field?

    Profile photo of amaroak

    Hi!, I try to integrate api in part registration with custom fields buddypress, but I can not make this save me the contact in the campaign that I need to give the fields to the API but seeing settings buddypress, I realized that if I have 2 textarea does not generate code 2 textarea, but one that I think is the array type, and throws.

    <?php if ( 'number' == bp_get_the_profile_field_type() ) : ?>
    <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'vibe' ); ?><?php endif; ?></label>
    <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
    <input type="number" name="<?php bp_the_profile_field_input_name(); ?>"  class="form_field" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" />
    <?php endif; ?>
    <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
    <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'vibe' ); ?><?php endif; ?></label>
    <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
    <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea>
    <?php endif; ?>


    $CAMPAIGN_ID = array_pop(array_keys($campaigns));
    # add contact to the campaign
    $result = $client->add_contact(
        array (
            # identifier of 'test' campaign
            'campaign'  => $CAMPAIGN_ID,
            # basic info
            'name'      => 'Test',
            'email'     => 'test@test.test',
            # custom fields
            'customs' => array(
                    'name'       => 'field name',
                    'content'    => 'field content'
                    'name'       => 'field name',
                    'content'    => 'field content'

    I need to spend the fields manually to the api so you know you add each field


    Profile photo of adpihamat

    Hi Everyone

    I’m looking for help with the following logic, if anyone can help it would be greatly appreciated. It is required in the registration and is based on a users selection of a school

    If a user selects a school from the dropdown list ie. School 1, then by selecting that school
    it sets pre-defined groups and assigns the school and the pre-defined groups to the users profile.

    My way of thinking (maybe way off)

    //Input type = select
    School 1
    School 2
    School 3

    //Input type = checkbox
    Group 1
    Group 2
    Group 3
    Group 4

    //Condition: if user selects an option from dropdown field
    if(select id == option value(“School 1”)
    // set these groups checkbox fields as selected
    set group pre-defined-groups(“Group 1”, “Group2”, “Group 4”)

    // assign selected school option to user’s profile
    ??? (select field is only used to allow those groups pre-defined to be used by a new user registering to the site).

    // assign pre-defined-group checkbox field to user’s profile
    ??? (because these groups are set up through buddy press does that mean they should automatically be added)


    if(select id == option value(“School 3”)
    // set these groups checkbox fields as selected
    set group pre-defined-groups(“Group3”, “Group 4”)

    // assign selected school option to user’s profile

    // assign pre-defined-group checkbox field to user’s profile

    admins should be able to change school or groups anytime


    Profile photo of shanebp

    Your task is very logical – but fraught with danger.

    Have you noticed that emails can be edited from a Profile page via Settings?
    And how a confirmation email is sent?

    And this setting: wp-admin/admin.php?page=bp-settings > Profile Sync ?

    So it’s possible but not easy.
    Display of those fields is fairly simple – but writing handlers to save those fields… eek.

    If it was me, I’d just add Profile fields for bio and website – and move on.

    Profile photo of lucaram

    Hi there,

    I have extended profile (dashboard > User > Profile Fields) with birthday (day/month/year drop down menu).
    How can a user receive notifications for his friends birthdays?

    Found something here: :

    but I don’t know how to modify code.

    Could you please assist?

    Profile photo of glennnall

    when i added Xprofile Custom Fields Type, dropdowns for Custom Post Types and Custom Taxonomies are made available. Can anyone show me how I might call the list of editable roles to be included in these dropdown options?

    Very Kind Regards,

Viewing 25 results - 1 through 25 (of 4,674 total)
Skip to toolbar