BuddyBoss Home – Web Support Forums General BuddyPress (general issues) How to change the text as per the user gender?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Question

    #37139
    @benworx

    hi,
    the issue is when user change the profile or update the profile then it always show that e.g
    Marijke changed his profile picture. in this case Marijke is female and text should be like Marijke changed her profile picture.but always shows his
    so how to fix this problem .

    TY

    Answers

    #37296
    @style960

    @benworx What version of Buddypress are you using? I have 2.2.1 with no edited translations, and I see “Ben changed their profile picture”…

    #37394
    @benworx

    Hi Paul ,
    The version of Buddypress i am using is 2.2.1 . and what i seen is Karen Anne Bakker changed his profile picture (But is should be like Karen Anne Bakker changed her profile picture)

    #37515
    @benworx

    Hi Paul,

    The gender setting does not seem available in the Buddyboss profile.

    Gender is a standard function from Buddypress. Is there a method to implement it in to the theme and wall?

    Thanx!

    #37516
    @style960

    @benworx I don't use BB Wall so I can't advise there. Have you tried disabling that to see if your grammar issue is still there? I don't see it on a standard Buddypress install with BB or Boss installed.

    #37517
    @benworx

    Thanx Paul,

    I'll start asking these questions in the moderated forum for the Buddyboss wall..

    It is in the wall that the gender issue appears:

    Example: Sarah update his profile picture…

    Thanx for your help!

    Ben

    #37616
    @vapvarun

    Hello Ben, Gender is not the core field for the Buddypress or WordPress.
    it is site admin who creates X-profile fields on the basis of his requirements.

    Add this code in bp-custom.php or child themes functions.php
    and create a Xprofile Field with name : Gender
    with option Male and Female

    It is just a conditional check for print updated message.

    function boss_activity_change_avatar( $entry, $user_id ) {
        $gender = bp_get_profile_field_data( 'field=Gender&user_id=' . $user_id );
    
        if ( $gender == 'Male' ) {
            $entry = sprintf( __( '%s updated his profile picture', 'buddypress' ), $userlink );
        } else if ( $gender == 'Female' ) {
            $entry = sprintf( __( '%s updated her profile picture', 'buddypress' ), $userlink );
        } else {
           
        }
        return $entry;
    }
    add_filter( 'bp_xprofile_new_avatar_action', 'boss_activity_change_avatar', 10, 2 );

    Regards
    Varun Dubey

Viewing 7 posts - 1 through 7 (of 7 total)
  • The question ‘How to change the text as per the user gender?’ is closed to new replies.