Add addition image size options to Genesis – User Profile widget

Community Forums Forums Design Tips and Tricks Add addition image size options to Genesis – User Profile widget

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  jdaviescoates 2 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #114779

    jdaviescoates
    Member
    Post count: 19

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

    Thanks in advance!

    http://omexchange.staging.wpengine.com
    #115187

    braddalton
    Participant
    Post count: 9916

    You can add them but they will be lost when Genesis updates therefore this solution is NOT recommended and NOT best practice.

    $sizes = array( __( 'Small', 'genesis' ) => 45, __( 'Medium', 'genesis' ) => 65, __( 'Large', 'genesis' ) => 85, __( 'Extra Large', 'genesis' ) => 125 ), __( 'Super Large', 'genesis' ) => 250 );
    

    Line 152 genesis > lib > widgets > user-profile-widget.php

    Another option is to use the filter

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

    #115193

    JanHoek
    Member
    Post count: 214

    A bit easier in your childs functions.php

    add_filter( 'genesis_gravatar_sizes', 'jan_user_profile' );
    function jan_user_profile( $sizes ) {
    	$sizes['Extra Large Image'] = 340;
    	return $sizes;
    }

    Hi, my name is Jan Hoek. Sure, they all say I have a big head, but I like to think it’s way too small for all my ideas.

    #115705

    jdaviescoates
    Member
    Post count: 19

    Thanks Jan,

    That did the trick nicely :)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.