php - Set user avatar from front end in wordpress -


i working on user registration page. when user upload image attached image in user meta attachment id, when user add comment uploaded photo not appearing in comment list beside comment. after search got information in avatar...but cant idea how upload avatar front side?

<?php if ( function_exists( 'get_avatar' ) ) {   echo get_avatar( $user->user_email, 50);  } else {   //alternate gravatar code < 2.5   $grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=      " . md5($user->user_email) . "&default=" . urlencode($default) . "&size=" .   $size;   echo "<img src='$grav_url' height='50px' width='50px' />"; } ?> 

please check code. should work.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -