[Support request] Comments Avatar Size change

Home Forums Support [Support request] Comments Avatar Size change

Home Forums Support Comments Avatar Size change

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #833373
    Anton

    Am I right in thinking that Avatar dimensions are dictated somewhere in the theme?
    If so, is there an easy way to change the size displayed please?

    Please note, if your answer includes anything like…’and add this function’ You can take it as read that I will already be lost!

    Thanks in advance

    #833406
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It does involve adding a function, but it’s not too hard! ๐Ÿ™‚

    This is the function:

    add_filter( 'generate_comment_avatar_size', function() {
        return 100; // The size in pixels. This would be 100 x 100.
    } );

    The function can be added super easily using a function like this: https://wordpress.org/plugins/code-snippets/

    Let me know if you need more info.

    #833522
    Anton

    Thanks for the help Tom.
    I added that via the code snippets plugin but the images are still tiny?

    You can see an example here.

    https://kingcannabidiol.co.uk/product/8-800mg-cbd-oil/#reviews

    #833676
    David
    Staff
    Customer Support

    Hi there,

    the display size is set by Woocommerce CSS, so you will need this:

    .woocommerce #reviews #comments ol.commentlist li img.avatar {
        width: 40px;
    }

    The avatar is absolutely positioned so making too big will mean it overlaps the content. Let us know.

    #833714
    Anton

    Hi David. I wondered where you’d disappeared to! No more Flint Skin website?

    Anyway, that worked perfectly and, given that it was a woocommerce setting rather than a GeneratePress setting, I’m grateful for the help. Above and beyond. Thank You.

    You were right about the content overlap but set at 65px, it does what’s required without issue.

    Thanks again

    #833729
    David
    Staff
    Customer Support

    Awesome ๐Ÿ™‚ it still out there somewhere. Some great guy called Tom invited me to help out here. Couldn’t turn it down lol

    #833731
    Anton

    Well you enjoy it. Thanks again.
    Missing the CSS videos on YouTube though, got to be honest.
    (great guy eh? Pay review time? ;))

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.