Set avatar as background image
-
Hello!
I am currently trying to set the wp-user-avatars on my site to be background images. I am using the following code to do so:
<div id=”user-stream-avatar” style=”background-image: url(‘<?php echo get_wp_user_avatar_src($offline_users[$i], 1140) ?>’)”></div>
I have used this successfully with featured images from posts, with the following code:
<div class=”post-bg-size-big” style=”background-image: url(‘<?php echo $image[0]; ?>’)”>
Is there something I am missing in relation to how wp-user-avatar works?
The main place I am trying to use this code is at the following URL:
Thank you very much for your help!
Nic
The topic ‘Set avatar as background image’ is closed to new replies.