Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show the author avatar of the current WordPress post.
<?php
// Display current post's author avatar (includes <img> tag)
echo get_avatar( get_the_author_meta( 'ID' ), 96 );
// Display current post's author avatar URL
echo get_avatar_url( get_the_author_meta( 'ID' ), array( 'size' => 96 ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment