Add Custom Gravatar Image Sizes To Genesis User Profile Widget

Genesis includes a widget in the genesis > lib > widgets > user-profile-widget.php.

The code includes a filter you can use in your child themes functions file to add, remove or modify Gravatar image sizes.

$sizes = apply_filters( 'genesis_gravatar_sizes', $sizes );

Firstly, here’s what the widget looks like in the Widgets admin page after adding 2 additional image sizes:

genesis user profile widget

Based on the following question, i’ll give you the code you can use to add additional custom image sizes.

I would like to add some larger image size options to the Genesis – User Profile widget, anyone know how to do this?

genesis profile widget gravatar image

Here’s the PHP code you can copy from the view raw link in the Gist and paste at the end of your child themes functions file using a code editor.

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.