Show Avatar image before the Author Name in Astra theme

Do you want to display the author image next to the author name in the post meta area under the post title in the Astra theme? By default, only the text-only author name display in that location. However, using a few lines of code can help you add author image next to the author name.

Preview: Avatar photo next to the Author Name

Author avatar

PHP Snippet: Add the Author Image

In the WordPress Dashboard, go to Appearance > Theme Editor and open the functions.php file of your Astra chid theme. Then add the following code at the end. Alternatively, you can use code snippets plugin for adding custom code.

Share this Tutorial


  1. Zoe on May 9, 2020 at 1:03 am

    Hey, great thanks!

    This worked!

    Could you tell me how to make the image circular, and how to add the word “by”after the image before the author name?

    • Chinmoy Paul on May 10, 2020 at 10:08 pm

      Replace line no 28 of the above code with

  2. Tamilarasan V on May 10, 2020 at 9:50 pm


    This author’s image appears in the square. How to make it circled as it appears in your image shown above?

    • Chinmoy Paul on May 10, 2020 at 10:07 pm

      Try this CSS

      • Tamilarasan V on June 26, 2020 at 1:26 pm


        That CSS worked!

Leave a Comment