• Resolved sanderlt

    (@sanderlt)


    <?php echo get_avatar_url(get_the_author_meta( ‘ID’ ), array(‘size’ => 80)); ?>”> Im using this to get avatar url, but if I would want to use my facebook avatar its not working this way. so how to get stored in DB facebook avatar url? thank you!

Viewing 1 replies (of 1 total)
  • Thread Starter sanderlt

    (@sanderlt)

    Voila !!!

    <?php
    $author = get_user_by( ‘slug’, get_query_var( ‘author_name’ ) );
    $author_id = ($author->ID);
    $all_meta_for_user = get_user_meta( $author_id );
    $sm_avatar = ( $all_meta_for_user[‘wsl_current_user_image’][0]);
    ?>
    <?php $gr_avatar = (get_avatar_url(get_the_author_meta( ‘ID’ ), array(‘size’ => 150))); ?>

    <img width=”60″ height=”60″ style=”display: inline; ” src=”
    <?php if (!$sm_avatar){ echo $gr_avatar;} echo $sm_avatar ?>

    • This reply was modified 4 years, 2 months ago by sanderlt.
Viewing 1 replies (of 1 total)
  • The topic ‘how to get url of social network avatar’ is closed to new replies.