WordPress.org

Ready to get started?Download WordPress

Forums

Social Login
[resolved] Change Avatar Size (9 posts)

  1. demon11c
    Member
    Posted 1 year ago #

    Hi there
    How do I change the size of the (gr)avatar that is displayed in the widget after logging in?
    Thanks.

    http://wordpress.org/plugins/oa-social-login/

  2. CyberPanda
    Member
    Posted 1 year ago #

    Can you send a link? I don't use a widget version, but I can help you, if you'll show me your page.

  3. demon11c
    Member
    Posted 1 year ago #

    THanks. Here you go:
    http://www.yudemenrecords.com/

    Id like the gravatar to be big enough so dashboard, profile and logout are lined up.

  4. CyberPanda
    Member
    Posted 1 year ago #

    So, now you have 38px and you need size like 80px. You can use just css, but that's bad for rendering. Here's your code:

    <img alt="" src="http://1.gravatar.com/avatar/f37c7a5061736354779a1f540edcc2d8?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38">

    Size of your avatar is inside this link in middle: "?s=38" If you change this on "?s=80", your size will change. After it you must replace also height and width="38"with "80". It's defined also in classname img.avatar.avatar-38.photo, so if you want, you can add some styling in here.

    What is this plugin you use for sidebar?

    And very nice site, by the way.

  5. demon11c
    Member
    Posted 1 year ago #

    Thanks for the info. The widgets Im using are called "Social Login" and "Sidebar Login". Actually I guess it's not just a Gravatar issue. It would be the same for someone who logs in and doesnt use Gravatar. Also, Im not exactly sure which file I should edit to make the changes you are talking about.

  6. CyberPanda
    Member
    Posted 1 year ago #

    In plugins/sidebar-login/includes/class-sidebar-login-widget.php on line 269 is a code:

    echo '<div class="avatar_container">' . get_avatar( $this->user->ID, apply_filters( 'sidebar_login_widget_avatar_size', 38 ) ) . '</div>';

    Here try 38 replace with 80.

  7. demon11c
    Member
    Posted 1 year ago #

    ok thanks. Ill give it a shot when I have my other (bigger) issue sorted out.

  8. demon11c
    Member
    Posted 1 year ago #

    That worked. Thank you.

  9. CyberPanda
    Member
    Posted 1 year ago #

    You're welcome!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.