enter image description here

 <ol class="comment-list">
                wp_list_comments( array(
                    'style'       => 'ol',
                    'short_ping'  => true,
                    'avatar_size' => 34,
                ) );
        </ol><!-- .comment-list -->

This is controlling the avatar size →

'avatar_size' => 34, →

I want to replace this with an arrangement where inside a square box(background) I will have First letter of the name in the absence of an avatar. How can this be accomplished?

1 Answer 1


Use the get_avatar filter and develop a function to return whatever avatar you want.

  • How? can you elaborate with the code?
    – WordCent
    Sep 30, 2017 at 17:22
  • Might be just easier to use a plugin like this one.
    – jdp
    Oct 2, 2017 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.