WordPress.org

Ready to get started?Download WordPress

Forums

User Photo
[resolved] Picture not well located on comments (5 posts)

  1. battmanux
    Member
    Posted 1 year ago #

    in comments, css tag are missing. I added "avatar avatar-68" and it fixed the positioning.

    in user-photo.php:
    if(empty($attributes['class']))
    $img .= ' class="photo"';
    replaced by:
    if(empty($attributes['class']))
    $img .= ' class="avatar avatar-68 photo"';

    http://wordpress.org/extend/plugins/user-photo/

  2. cyberlocke
    Member
    Posted 1 year ago #

    Hi, battmanux. I'm pretty new to WordPress. Just tried your bit of code. Worked great for comments, however the reply avatar is now too big. Any thoughts? I'm assuming "avatar-68" you used in the code change has to do with the dimensions. Where is that class defined in the style sheet? Wasn't able to find. Thanks!

  3. battmanux
    Member
    Posted 1 year ago #

    in style.css of my theme

    .commentlist .children li.comment .comment-meta {
    line-height: 1.625em;
    margin-left: 70px;
    }

    instead of:
    .commentlist .children li.comment .comment-meta {
    line-height: 1.625em;
    margin-left: 50px;
    }

  4. cyberlocke
    Member
    Posted 1 year ago #

    awesome. Thanks.

  5. cyberlocke
    Member
    Posted 1 year ago #

    Wait, one more quick question. So when I look at a default Avatar like Mystery Man, there is a larger one that says img=avatar.avatar-68-photo etc. etc. I assume that is related to the PHP code you changed in your initial post. But when there is a smaller avatar like the reply to a comment field the file says img=avatar.avatar-39-photo. Now, I've adjusted the import sizes for my photo in User Photo to 68 and 39 px respectively, which makes them appear correctly without ever touching the style sheet. But when I inspect the smaller photo in a comment reply it says img=avatar.avatar-68-photo instead of img=avatar.avatar-39-photo. What is going on here? Really wanna understand the underpinnings. Thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.