Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 301 through 325 (of 3,904 total)
  • Author
    Search Results
  • #308537
    David Cavins
    Keymaster

    Well, you’ll have to be sure that the “Profile Field URL” field has the id of 6 on your installation. On your site, visit the Profile Fields admin at Wp Admin > Users > Profile Fields (/wp-admin/users.php?page=bp-profile-setup) and hover over the “Edit” button for the field you want to affect. The link will look something like /wp-admin/users.php?page=bp-profile-setup&mode=edit_field&group_id=1&field_id=7 showing you the field_id you want to use.

    pixieblitz
    Participant

    Hi! I’m using the latest version of WP and BP, with a CologMag child theme and the Legacy BP templates.

    When editing a members profile, I’d like all their profile fields to show up without having to click through separate tabs and reload new pages for the basic Primary field group and the Details section. I think our members aren’t noticing that they even have extra fields group to fill out… and we have so few fields that it doesn’t make sense to load them separately for editing purposes. (I just split them up to avoid cluttering the registration form.)

    I’m guessing I’d have to modify the edit.php file, but I don’t know what changes to make to get the result I’m looking for. Any pointers would be very much appreciated. Thank you!

    demonboy
    Participant

    Hi,

    Is there a way of adding already existing fields to the BuddyPress profile page? My membership is controlled by MemberPress and there are a load of fields relating to that that I would like to include on the BuddyPress profile page. Rather than sending the user to a different account page, it would be nice to include them here so that they are editable by the user. So far all that is displayed on the profile page is Base:Name.

    I know there is a section that allows the creation of new fields, but what about already existing fields?

    I’m quite new to BuddyPress and I can just about muddle my through php but I wondered if there’s a plugin that allows this, or perhaps someone knows of a simple guide to doing this?

    Thanks in advance.

    WP 5.2.3
    BP 5.0.0

    jcfromkc
    Participant

    On the Members Profile page I’d like to have the Profile Field URL open in a new window.

    I found the following article regard this issue.

    https://buddypress.org/support/topic/profile-fields-open-url-in-new-tab-_blank/

    I’ve tried the mentioned function below but its not working.

    function swiss_target_blank( $field_value, $field_type, $field_id ){
    	
    	if( $field_id == 6 ) {
    		$field_value = str_replace('rel="nofollow"', 'rel="nofollow" target="_blank"', $field_value);
    	}
    	return $field_value;
    }
    add_filter('bp_get_the_profile_field_value', 'swiss_target_blank', 11, 3);

    It works when I modify the core file located at buddypress/bp-xprofile/classes/class-bp-xprofile-field-type-url.php, line 176. I’d like to find a way to do this without editing the core.

    The article referenced above was written about 4 years ago. Has someone changed recently that would prevent the function from working?

    Can someone please point me in the right direction? Thx

    #308431
    jcfromkc
    Participant

    I’m actually trying to hide the DIV and the empty Profile Field within the DIV. I’ve come up with this so far. I’ve created a file called hide-empty-profile-fields.js and enqueued the script.

    $(document).ready(function() {
         str = $('div.profile-page-location').text();
       if($.trim(str) === "") {
         $('div.profile-page-location').hide();
       }   
         str = $('div.profile-page-status').text();
       if($.trim(str) === "") {
         $('div.profile-page-status').hide();
       }  
        str = $('div.profile-page-zodiac').text();
       if($.trim(str) === "") {
         $('div.profile-page-zodiac').hide();
       }
        str = $('div.profile-page-occupation').text();
       if($.trim(str) === "") {
         $('div.profile-page-occupation').hide();
       } 
        str = $('div.profile-page-website').text();
       if($.trim(str) === "") {
         $('div.profile-page-website').hide();
       }
       
    });

    It works, but it’s not optimal. Using this method, the empty fields do not become hidden until the page is fully loaded. This causes a weird shift to occur upon page load.

    Still working on this.

    ali
    Participant

    I am trying to do the similar thing, I want to set the display name as the name and last name fields of the xprofile. But it does not work.

    #308396
    David Cavins
    Keymaster

    Hi Tom-

    It sounds like you have a lot of balls in the air. For instance:

    Remember, I have removed the original xprofile_sync function.

    Honestly, I can’t know enough about your setup to tell you anything for sure. What I can tell you is this:

    • bbPress uses WordPress’s “Display Name” field, not a BuddyPress field.
    • BuddyPress only updates the WP “Display Name” field when profile syncing is enabled.
    • BP’s default sync function also updates WP’s “First Name” and “Last Name”
    • The replacement function I provided updates WP’s “Display Name” but _not_ the “First Name” and “Last Name” fields.

    Feel free to comment out the “nickname” update line. You won’t hurt anything. You’ll just not update the BP “nickname” field. Which won’t affect the name bbPress displays.

    #308371
    jcfromkc
    Participant

    There’s an article about this topic that was marked Resolved, but the author did not reveal the actual solution.

    Only Display Custom Field if not empty

    I’m using the front.php template to customize the members profile page. On the members profile page, I’m trying to hide all Profile Fields that are empty.

    I’ve tried the code outlined in the referenced link with no luck. That post is about 4 years old so I don’t know if the information is the most up to date. When using the referenced code, I can’t get anything to show up on the page.

    Can someone please point me in the right direction?

    Thx, JC>

    #308368
    tom durocher
    Participant

    Hi David,

    I have tried out your code and there’s a problem. But first, to address your question about the “name” field, when I’m talking about Forum Name I am talking about the Group (which had been called Base Profile). That is what I changed to Name, for UX reasons. However, I see that the field I’m calling “Name” is field_1 so probably I did change it from Display Name to Name but, as I think you know, that is not the problem.

    Regarding the code you gave me, that did solve the problem of not updating the WP First and Last name fields. However, it also prevented changes to the forum name or display name or whatever you want to call the name in the Forum Profile. I’m tempted to try commenting out the line:

    bp_update_user_meta( $user_id, 'nickname', $fullname );

    but I’m working on a live site with quite a bit of action and got a little spooked that I might change everybody’s existing posts/names, so for now I’ve just removed all your code.

    Thanks,
    Tom

    #308273
    404user
    Participant

    WordPress 5.2.3
    Buddypress version up to date 5.0.0.

    Hi Only the base profile is showing up on registration and being logged into account.I am trying to build a couples profile so I would have the data from both the man and the woman, how do I go about this? I want to enable extra fields and also how do i put them extra fields in a new tab? I have disabled my theme and put the twenty twelve and still the same problem, please help

    They show up in my user profile fields but nowhere else on my site, only the base is showing.

    #308164
    404user
    Participant

    I have been struggling with this for a few hours, on the registration page it only shows the base profile fields,It is not showing extended profile fields. I have deactivated all other plug ins, changed the theme to twenty sixteen, still doesn’t work, please help me

    #308155
    David Cavins
    Keymaster

    Hi @ibes-

    I’d try to use Xprofile for managing profile fields. There’s a lot of baked-in goodness with the Xprofile component.

    Obviously, I don’t know what will work in your situation, but it seems like name matching is reasonable. You could probably also extend the Xprofile Groups and Fields classes to add some sort of persistent-ID parameter for each object.

    Check out the code at bp-xprofile/classes/.

    #308151
    David Cavins
    Keymaster

    Hi Tom-

    I’d guess that you (or the previous site admin) edited the Display Name field to be called “Name.” You can check by visiting this screen on your installation: /wp-admin/users.php?page=bp-profile-setup

    “Display Name” is usually the first profile field created, so if you inspect the input, and it has the name=field_1, then you can guess that your “Name” field is the “Display Name” field I’m talking about, just renamed, similar to how you renamed the “Base profile.” It sounds like when you’re talking about “Forum Name” you’re talking about BP’s Base Profile > Display Name, but with your own naming convention.

    I also was wrong about the synchronization between Display Name and First and Last name. If I update the Display Field to be “Too Slim”, the WP First Name will become “Too” and the WP Last Name will become “Slim,” assuming that “Enable BuddyPress to WordPress profile syncing” (s you said). The WordPress “Display Name” field will become “Too Slim.” The WP “Display Name” is also looks like what is used by bbPress in its loops.

    So, if you want your users to be able to change the name used by the bbPress forums, you’ll need to have “Enable BuddyPress to WordPress profile syncing” checked. Then, the WP “Display Name” field is updated when the BP “Display Name” field is checked. If you want to leave WP’s First and Last Name fields to not be synced after sign-up, the following code could be added to your bp-custom.php file or wherever you keep your customization code:

    
    // Remove BP's action because it syncs nickname, display_name, first_name and last_name.
    remove_action( 'xprofile_data_after_save', 'xprofile_sync_wp_profile_on_single_field_set' );
    function my_custom_xprofile_sync_wp_display_name_only_on_single_field_set( $user_id = 0 ) {
    	// Bail if profile syncing is disabled.
    	if ( bp_disable_profile_sync() ) {
    		return true;
    	}
    
    	if ( empty( $user_id ) ) {
    		$user_id = bp_loggedin_user_id();
    	}
    
    	if ( empty( $user_id ) ) {
    		return false;
    	}
    
    	$fullname = xprofile_get_field_data( bp_xprofile_fullname_field_id(), $user_id );
    
    	bp_update_user_meta( $user_id, 'nickname',   $fullname  );
    
    	wp_update_user( array( 'ID' => $user_id, 'display_name' => $fullname ) );
    }
    add_action( 'xprofile_data_after_save', 'my_custom_xprofile_sync_wp_display_name_only_on_single_field_set' );
    

    It’s a modified version of this function, leaving the first and last name logic out: https://github.com/buddypress/BuddyPress/blob/5.0.0/src/bp-xprofile/bp-xprofile-functions.php#L803

    #308150
    tom durocher
    Participant

    David (@dcavins), do you have any ideas why I wouldn’t be seeing the Display Name under Edit Profile, as you said it should? Or why Buddypress overrides important BBpress fields for editing the forum profile? I think there must be a way around this. I do not see that Memberpress is involved in this profile page at all (no apparent mepr classes or js shown in developer tools). Thanks very much for any help.

    #308027
    ibes
    Participant

    That seems to be super helpful, thanks.

    Put still a field “name” is also the field title, right?

    So if I would try to make the name very unique.
    Like “unique45myField” this would be something that is user-facing, right?

    As the ID can be different in each installation I should rely my system on the field name. But if the field name is visible to the user, I should not go wild with it.
    I feel a bit stuck in this thought loop.

    Are the plugins who add xprofile fields to BuddyPress? How are they doing it?
    Could it make sense to overwrite the field name for display via a filter or so?

    That filter could do it:
    bp_get_the_profile_field_name

    Then I could work internally with a very unique field name and just overwrite it for display.
    Dirty workaround but would likely give me better sleep 🙂

    Or is xprofile anyway not the best idea and there is another, more suitable way to add profile fields to BuddyPress profiles?

    #308012
    tom durocher
    Participant

    Ah, thanks for the response. The url I’m using is, for example, https://masteringid.com/members/testmember/profile/edit/group/1/, which produces the following form:
    Edit Profile
    Editing “Forum username” Profile Group
    Name (required)

    This field may be seen by: Everyone
    Forum Signature

    Note that I have changed “base profile” to “forum username” as it seemed more to the point. So I think this is the page you are referring to but there is no Display Name field shown. I don’t so much need the First and Last Name fields as the display name field, because, although changing the forum username will change the display name, it also changes the First and Last Name (through the “Sync with WP profile” checkbox.

    BBpress alone shows First Name, Last Name, Nickname, and the Display Name dropdown. If I could have the Nickname and Display Name fields, or even just the Display Name field, I think I’d be okay.

    #308005
    David Cavins
    Keymaster

    Hi @tdurocher-

    What screen are you using to change the bbPress “forum name”? (That’s unfamiliar to me.)

    BuddyPress uses the user’s profile to manage names, and doesn’t generally interact with the First and Last name fields; it allows the user to manage the Display Name field. For instance, via http://bptest.local/members/admin/profile/edit/group/1/

    Adding MemberPress to the mix complicates the issue somewhat, too.

    #307999
    David Cavins
    Keymaster

    Hi @ibes-

    You can get the profile field groups and fields by using the function:

    $groups = bp_xprofile_get_groups( array( 'fetch_fields' => true ) );

    With this information, you should be able to determine whether a field exists and what its ID is.

    Best,

    -David

    msolution
    Participant

    im working with pre_get_posts action hook, and calling xprofile_get_field_data in the function it is returning an empty string, after looking into the function it seems the $bp->profile array is not fully loaded, and $bp->profile->table_name_fields is missing and generating a mysql error.

    I have disabled all other plugins, and still the issue persists.

    what am i missing?

    WordPress 5.2.3
    BuddyPress Version 4.4.0
    this is an intranet site!
    Theme: Multi NewsVersion: 2.6.5 [www.momizat.com]

    The Issue does not happen on TwentyFifteen/ TwentyTwelve

    Looking for a fix.

    #307822
    tom durocher
    Participant

    I’m using BBpress for forums and Buddypress for forum profile features and in future would like to use more BuddyPress features. My problem is that if a user changes their forum name, it is changes the first name account field to the forum name and clears out the last name account field. If I uncheck the Buddypress setting “Sync with profile fields” this does not occur but the forum name does not change at all. I don’t mind syncing forum name with “display name” but the first and last name fields can’t be wiped out. I know I must be doing something wrong but can’t find it. I’m also using Memberpress for registration.

    #307713
    m2sahin
    Participant

    Hello to everyone

    How to sync buddypress xprofile fields with user meta? I’ve been investigating this for a month, but I don’t get any results. Please help me with this. The only way for me is to get support from here.

    This is what I want to do https://drive.google.com/open?id=1t2x1ACgelvMBgSYj902ht8oNTclMCbuo

    Thanks, Waiting for help.

    #307607
    andhi1
    Participant

    Hi!
    I have installed BuddyPress Xprofile Custom Field Types but the fields is not displayed in profile
    See image:
    sexintressen

    BR
    Anders
    Sweden

    elyonardo
    Participant

    Hello everyone! 🙂
    I have a site in Joomla that I would like to switch to WordPress. On this site, the Community Builder plugin is installed and I read that the WordPress correspondent is BuddyPress.

    I tried (with local sites, to do the tests) to migrate users from Joomla to WordPress wanting to keep the fields in CB. I tried to export from CB to CSV and import them into BuddyPress, using the “Import users from CSV with meta” plugin, and adding, on the BP side, the profile fields that are CB side and modifying the CSV to match.

    Am I having a useless job or is this a good way? Are there any alternatives?

    Thank you all!

    #307602

    Topic: Profilepage

    in group forum Installing BuddyPress
    safnayardd
    Participant

    hi, i have two filed gropus one is base(primary) and other is extra. i have two user roles, employer and Candidate which will choosen at the time of registration. after signup, make the profile fields of “extra” group show only for employer role in the profile edit page., how could i achieved it?

Viewing 25 results - 301 through 325 (of 3,904 total)
Skip to toolbar