Fix for avatars plugin docs

In the avatars pluging docs it says to add this to show the blog avatar:

<?php echo get_blog_avatar(1,'32','identicon'); ?>

That's probably not what you want because it will always show the avatar for blog 1. Here is what you probably want:

<?php echo get_blog_avatar($wpdb->blogid, '32', 'identicon'); ?>

    Jake

    Even though it's a few months old, this is exactly what I was looking for. Is the updated code pulling the blog avatar for the author of each post or the blog that owns the post?

    Andrew

    Hi Guys,

    That bit of code is just an example, it's not meant to be used as is.

    Is the updated code pulling the blog avatar for the author of each post or the blog that owns the post?

    The code lucidology provided will display the blog avatar.

    Thanks,
    Andrew

    Jake

    Thanks Andrew. The code Lucidology provided actually works great in my case, except it's only pulling the avatar for Blog 1. (I'm using it in conjunction with the recent global posts widget)

    I'd like to have it pull the avatar for the blog that each post belongs to (even if it's the same author between blogs). Can you point me in the right direction?

JOIN 396251 HAPPY MEMBERS

We pride ourselves on our level of customer support and responsiveness to member requests. Your WordPress experience will never be the same


Start free trial