How To Change Author & Comment Box Gravatar/Avatar Image Size

Need to change the size of your Gravatar image in your author box? If you’re using the fanciest author box plugin, here’s a short and easy tutorial about how to change your author avatar size.

First, you need to edit line 16 in /includes/ts-fab-construct-tabs.php. It says this, you just need to change the number (64) into whatever you want avatar size to be in pixels:

$authorimg = get_avatar( $author->ID, 64, '', esc_attr( $author->display_name ) );

Then, in you child theme’s style.css file, add this (presuming you want to set avatar to be 96 pixels:

.ts-fab-avatar { width: 96px !important; height: 96px !important; }
.ts-fab-text { margin-left: 120px !important; }

The left margin for .ts-fab-text should be your avatar size plus the spacing between avatar and the text, in this case spacing would be 24 pixels.

Change Comment Gravatar Size Genesis

If you don’t use the Fanciest author box plugin and simply want to increase the size of your Gravatar using the Genesis design framework, you can use this code.

Add this code at the end of your child themes functions.php file using a text editor like Notepad++.

Related Tutorials


Comments

2 responses to “How To Change Author & Comment Box Gravatar/Avatar Image Size”

  1. Jakob Gad Avatar
    Jakob Gad

    Hmm – seems so simple, but I have no luck at all. I’ve edited ts-fab-construct-tabs.php in the subfolder of fanciest-author-box folder, but the attributes remain the same.

    Any tip for me?

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Jakob

      Are you referring to the fanciest author box plugin or the Genesis author box as the code is completely different for each?

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.