User avatar in BuddyPress notification loop

BuddyPress by default doesn’t show user avatar in the notifications. But you can do that by simply adding couple of lines in notification loop.

BuddyPress stores the other user id as secondary id.

Here is the code to be used in notification loop.

echo bp_activity_avatar(
    array( 'user_id' => bp_get_the_notification_secondary_item_id() )
);

That’s it…

Related Articles

Add custom filter for searching post or users in WordPress backend

For this, two parts are important. Part 1: Adding select dropdown Below is the action by which we can add a new search filter for…

First WordCamp

I am going to tell you about my first WordCamp which was held in Pune on 15th Jan 2017. And yes I was very happy…

Edit old commit message on github

Sometimes we make mistake in git commit message, especially spelling mistake. Even though I think twice before pressing the enter key after I write the…

The last day ( છેલ્લો દિવસ )

Hi there, The last day, yes I am talking about the last day of the year 2016. Another year passed and I became 26 in…

WordCamp Mumbai

Whooaaaaaaaaa…!!!!!!!!!!!! Mumbaaaaaaaaiiiiiiiiiiiiiiiii…………………………………… Mayanagari…….. This was my 2nd WordCamp and it was at Mumbai. This WordCamp was like medicine for me as I had some problems…

Responses

Leave a Reply