How to Get Profile image in WordPress
This code for getting your profile image in WordPress, this code is working, try this code.
<?php $user_id=get_the_author_id(get_the_ID()); $meta=get_user_meta($user_id); $user=get_userdata($user_id); #print_r($user); $image_attributes = wp_get_attachment_image_src( $attachment_id = $meta['et_avatar'][0] ); if ( $image_attributes ) {?> <img src="<?php echo $image_attributes[0]; ?>" width="<?php echo $image_attributes[1]; ?>" height="<?php echo $image_attributes[2]; ?>" /> <?php }else{?> <img src="http://ture.bollywoodbite.in/wp-content/uploads/2016/08/default_avatar.png"> <?php } ?>
Author: Learn Tutorials Point
We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.
Trending Posts
Tags
ACF
Ading custom columns
admin
Bootstrap
Cart Price
categories
Change Price
class
Code
comments
Create
Creating custom post Type
CSS
current
custom
Customizing
Custom Post
Custom Post Type
Custom Taxonomy
database
Date
Fatch
form
function
HTML
Image
Install
javascript
jQuery
Menu
PHP
Post
Post Type
Price
product
responsive
Resular price
Single product
Table
taxonomy
Theme
Title
woocommerce
Wordpress
Wordpress Code