The Question
How to get just the URL to a post author\'s avatar?
The Requirements
I want the url to the image that
I'm not sure this answer was incorporated into Cale's answer so I've undeleted it in case it's of use to anyone else.
in the loop (in say single.php)
or call from functions.php file in theme folder
the call (from your loop in say single.php)
the function (place in functions.php)
function custom_get_author_avatar_url() {
$authorUserID = get_the_author_meta('ID'); // get the user id of the post author
echo bp_core_fetch_avatar (
array( 'item_id' => $authorUserID, // output user id of post author
'type' => 'full',
'html' => FALSE // FALSE = return url, TRUE (default) = return url wrapped with html and css classes
)
);
}