• Resolved laboundguide

    (@laboundguide)


    Hi there,

    I see there is a place to add CSS for the Leaderboard, but I’m not sure what CSS tags to use. I want to change the look, such as making the avatar much smaller, and having the avatar be a circle instead of a square.

    I apologize for my ignorance, I’m not sure where to find the CSS tags so I know what to call out when I edit. Thank you!

Viewing 1 replies (of 1 total)
  • Plugin Author dpowney

    (@dpowney)

    Hi there,

    The avatar appearance can be changed in your theme. Without seeing your HTML, it’s difficult to provide you the exact CSS you need.

    This is what I have done in my theme. I have added a class “img-circle” to the avatar image with the following code added in my functions.php file. This code only works if your avatar already has a class “avatar” applied to it.

    function theme_get_avatar( $avatar ) {
    	$avatar = str_replace( "class='avatar", "class='avatar img-circle", $avatar ) ;
    	return $avatar;
    }
    add_filter('get_avatar', 'theme_get_avatar', 10, 1 );

    Then, I use that CSS class to add a rounded image style.

    .img-circle {
    	border-radius: 50%;
    }

    Daniel

Viewing 1 replies (of 1 total)
  • The topic ‘CSS for Leaderboard – circle avatar’ is closed to new replies.