-
AuthorPosts
-
April 25, 2014 at 9:42 am #255993
Hi,
i use enfold with buddypress. It works great!
I have one thing i can’t find a solution for.
In the group there is the activity stream. I want to remove the group avatar from the activity stream. I found an answer with this code.function bp_dtheme_activity_secondary_avatars( $action, $activity ) { if ( $activity->component = 'friends' ) { // Only insert avatar if one exists if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) { $reverse_content = strrev( $action ); $position = strpos( $reverse_content, 'a<' ); $action = substr_replace( $action, $secondary_avatar, -$position - ); } break; } return $action; } add_filter( 'bp_get_activity_action_pre_meta', 'bp_dtheme_activity_secondary_avatars', 10, 2 );
But this does not work when i put it in the child themes function.php . I get a white page.
It would be great if someone has an idea how to solve that problem”
Thanks Simon
April 25, 2014 at 11:51 am #256038Hey simonac!
Thank you for using the theme!
Please try this:
function bp_dtheme_activity_secondary_avatars( $action, $activity ) { switch ( $activity->component ) { case 'friends' : // Only insert avatar if one exists if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) { $reverse_content = strrev( $action ); $position = strpos( $reverse_content, 'a<' ); $action = substr_replace( $action, $secondary_avatar, $position); } break; } return $action; } add_filter( 'bp_get_activity_action_pre_meta', 'bp_dtheme_activity_secondary_avatars', 10, 2 );
We would like to see an example of the page where the avatar is showing.
Regards,
IsmaelApril 25, 2014 at 11:56 am #256040This reply has been marked as private.April 26, 2014 at 9:44 am #256503Hi!
Thank you for the update.
Are you trying to remove the images or avatar on the comments or feed area? I don’t understand the language so I’m not sure what it is. Please try this on Quick CSS or custom.css:
.groups img.avatar { display: none; }
Cheers!
IsmaelApril 26, 2014 at 12:21 pm #256548Hi Ismael,
just the avatar on the feed. Your codes deletes the group avatar images of the feed but also the big group image on the top of the group. The main group image should not be deleted.
Kind Regards, Simon
April 26, 2014 at 12:23 pm #256549http://www.directupload.net/file/d/3604/bfcpu4vt_jpg.htm
here is a sshot- This reply was modified 10 years, 6 months ago by simonac.
April 28, 2014 at 9:09 am #256945Hi!
Try this code:
#top .activity-header img.avatar { display: none; }
Cheers!
PeterApril 28, 2014 at 2:35 pm #257078Perfekt. That did the Job! Thanks guys!
Great support!
Simon
April 28, 2014 at 2:36 pm #257080Do you also have an idea how i can custmize the size of the group image on top?
April 29, 2014 at 9:49 am #257536Hi!
No, unfortunately I’m not familiar with buddypress and I don’t know how you can replace the image with a bigger thumbnail.
Cheers!
Peter -
AuthorPosts
- You must be logged in to reply to this topic.