Hi friends, in this post I would like like explain how to write php code in author widget in wordpress blog. In earlier we learned about how to create WordPress widgets and execute PHP Code in WordPress Widget, this post is extended to earlier posts.

In this post I will explain with what I have implemented in my blog about author widget.
Step 1:
Open website https://en.gravatar.com/
Step 2:
Login to website and manage profile images
Step 3:
If you want to insert new image then go to https://en.gravatar.com/gravatars/new

Now you will successfully created image for your account. In the earlier post I have explained about execute php code in wordpress widget. So now in your wordpress widget write the below code to get the image for author.
Here get_avatar is function in wordpress, no need of re-written.
’80’ size of author image.
We can write our HTML or PHP code extra in that widget, then final outout will be
