Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display avatar following gender in xprofile fields

  • Avatar of julien760
    julien760
    Member

    @julien760

    Hello,

    I have created a xprofile field with gender (radio button with male or female choice).

    Now, I want to display a default picture for men and another one for women to distinguish clearly if the member is a male or a female.

    I have search for plugins but find nothing. I try to find the loop who bring the picture ( bp_core_get_avatar ? bp_member_avatar ?)

    I find a function to remove gravatar who works perfectly.

    Someone know how to help me ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of Xevo
    Xevo
    Participant

    @xevo

    Get xprofile field result, run it through an if, and just get the avatar out of your images folder of your theme. No buddypress avatar functions needed.

    Avatar of julien760
    julien760
    Member

    @julien760

    Thank you for your answer Xevo.

    Ok but if I do that, I’ll need to do in all area where there is profile picture… even in widget on sidebar… in member list, etc… It is very long, no?

    It is not possible to modify the bp_member_avatar function to include this test?

    It’s works like this when a member upload it’s own picture, it is automatically display as avatar but I don’t know how it works.

    Thanks

    Avatar of julien760
    julien760
    Member

    @julien760

    Nobody else have try to do this ?

    Avatar of chr313
    chr313
    Member

    @chr313

    I would like to have this, but I want to also upload my own avatars in random order out of a list of say 10 different avatars. Similar to what wavatar does but I want my own images.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.