Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Only Show Members with Avatars


Boone Gorges
Keymaster

@boonebgorges

I have done something similar. The reason why you can’t do it automatically is that avatar information is not stored in the database. You can get around this by creating some database content corresponding to avatars. There is a do_action hook near the end of the avatar upload process. Hook your own custom function to that hook that saves a has_avatar metadat item in the usermeta table using update_user_meta(). Then, in your widget bp_has_members loop, either load up a bunch of members and filter out the ones without avatars, or filter the sql queries themselves to make sure you only get members who have the has_avatar metadata. Not super straightforward, but definitely possible.

Skip to toolbar