Forums

[resolved] Resize Gravatar in Twenty-Ten child theme (5 posts)

  1. Tommy David
    Member
    Posted 1 year ago #

    There's a way to resize Gravatars (for example, from 40 to 80 px) in a Twenty-Ten child theme via functions.php, i.e. non editing original Twenty-Ten functions.php at line 307?

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    as line 288 suggests:

    if ( ! function_exists( 'twentyten_comment' ) ) :

    the function in the parent theme only gets used if it is not found in the child theme.

    you could rewrite (copy) the whole function into your child theme and change the size there.

  3. Tommy David
    Member
    Posted 1 year ago #

    All right. Not very handy (I had to copy entire twentyten_comment function in my 'child' functions.php!), but it works.
    Thanks!

  4. Zoinks! Graphics
    Member
    Posted 1 year ago #

    Don't forget, you have to change the padding under ".commentlist li.comment" in the theme's style.css file. Otherwise the larger gravatars will overlap your comments! Just change the default "padding:0 0 0 56px;" to something like "padding:0 0 0 90px;" for 80px wide gravatars.

  5. Tommy David
    Member
    Posted 1 year ago #

    Already done!

Topic Closed

This topic has been closed to new replies.

About this Topic