lucidology
Sophomore
Just Getting Started
Member Likes (0)
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'); ?>
Responses (4)
Member (joined February 2010) Likes (0)
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?
Erstwhile founder (joined May 2007) Likes (0)
Hi Guys,
That bit of code is just an example, it's not meant to be used as is.
The code lucidology provided will display the blog avatar.
Thanks,
Andrew
Member (joined February 2010) Likes (0)
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?
Erstwhile founder (joined May 2007) Likes (0)
Hiya,
You'll need to replace $wpdb->blogid with a variable containing the blog id the post is published on.
Hopefully that will help. Unfortunately we really can't provide custom coding assistance.
Thanks,
Andrew
WordPress Questions?
We've got answers!
Find out more »