-
Author
Tagged: profile photo
-
February 15, 2015 at 02:05 #46116troy7890Participant
Hello – I would like to be able to add a function to this theme that will add a default photo to profiles who have not yet uploaded one yet.
Displaying the member’s page as it is now, shows text in the photo position. And the text reads – “Profile picture of (Name)”. It really messes up the appearance. Also it’s an issue on the homepage when the member’s grid is used – like in your demo.
Hopefully it’s something we can add to the functions.php file and also something for a future update.
Thanks for the great support and theme!
February 17, 2015 at 16:10 #46399RaduModeratorHello,
You can find more information about this here : http://premium.wpmudev.org/blog/how-to-add-a-custom-default-avatar-for-buddypress-members-and-groups/ and here https://buddypress.org/support/topic/changing-the-default-mystery-man-avatar/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 22, 2015 at 04:39 #47051troy7890ParticipantHere’s what I have in my child functions file. It’s not working though. And yes this .png is on the server in that location. Please advise, thanks.
COPY CODE// change default avatar for members function myavatar_add_default_avatar( $url ) { return get_stylesheet_directory_uri() .'/images/BGL-icon72.png'; } add_filter( 'bp_core_mysteryman_src', 'myavatar_add_default_avatar' ); add_filter( 'bp_group_gravatar_default', 'myavatar_add_default_avatar' );
February 22, 2015 at 14:39 #47104sharmstrModeratorI could never get that to work either. Here’s what I use on my sites. It will add another option in WP Admin > Settings > Discussion
COPY CODE/** * Add a default avatar to Settings > Discussion **/ add_filter( 'bp_core_fetch_avatar_no_grav', '__return_true' ); define ( 'BP_AVATAR_DEFAULT', 'http://yoursite/wp-content/uploads/2014/10/default_avatar.jpg' ); define ( 'BP_AVATAR_DEFAULT_THUMB', 'http://yoursite/wp-content/uploads/2014/10/default_avatar_thumb.jpg' );
Obviously change the url and image names, then set it in Discussions
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.