• Resolved limone111

    (@limone111)


    hi

    another question ^^

    i have set in my wordpress avatar settings

    Identicon (automatic generated)

    this settings working fine with my forum, datingsite and other plugins but in wpadverts is not shown.

    is there any way to show the users avatar with my settings?
    thx^^

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, hmm the Identicon should show fine on Ad details pages if the user does not have a gravatar set (just tested this with my dev version), what do you see instead?

    Thread Starter limone111

    (@limone111)

    we dont use gravatar

    we use Identicon (automatic generated)

    take a look please:

    https://ibb.co/gL8yW6
    https://ibb.co/b0K5B6

    Plugin Author Greg Winiarski

    (@gwin)

    I am not sure, the first image you posted actually uses the Identicon?

    What image are you expecting to see for the user Lena?

    Thread Starter limone111

    (@limone111)

    lena have a userprofile and a prfoilephoto also but not shown
    in other plugins for example forums and chats her photos is shown.but all useres in the wpadverts plugin no photo is shown

    Plugin Author Greg Winiarski

    (@gwin)

    Ok thanks for the explanation. In WPAdverts the get_avatar() function is used to display use profile photo, but it does not use the email entered in user profile to get the avatar but rather the email address entered in Contact Email field in the [adverts_add] form.

    This is because in WPAdverts not logged in users can post Ads as well, so it is possible there will be no user account associated with the Advert.

    Right now the only way to change that is to open file wpadverts/templates/single.php and change the line

    
    <?php echo get_avatar( get_post($post_id)->post_author, 48 ) ?>
    

    to

    
    <?php echo get_avatar( get_post_meta($post_id, 'adverts_email', true), 48 ) ?>
    

    In the next release, we will make an update that will first look for the user id and then for the contact email. If all your users posting Ads are registered then this should give you the same avatars for WPAdverts, forums and chats.

    Thread Starter limone111

    (@limone111)

    Hi Greg…thx so much for your help…

    I have already this line in my original single.php

    <?php echo get_avatar( get_post_meta($post_id, ‘adverts_email’, true), 48 ) ?>

    but *lol* with <?php echo get_avatar( get_post($post_id)->post_author, 48 ) ?> it woks now and all is perfect. :)))

    thx greg

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘avatar not shown’ is closed to new replies.