WordPress.org

Support

Support » Plugins and Hacks » Show Only Avatars with Images?

Show Only Avatars with Images?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Paul Bearne

    @pbearne

    I have no way to know if there is an avatar as I just call the wordpress function.

    The best I can suggest is for you write a jquery that looks for the URL of your default Image and removes the parent div with the class of user.

    Paul

    Thanks for getting back to me, Paul.

    The problem is, i have not idea how to do that. Can you or anyone else help or at least point me in the right direction?

    Thanks in advance.

    Can anyone help?

    Plugin Author Paul Bearne

    @pbearne

    OK

    the trick id workout how to spot the default image

    What are you using to upload the avatar and setting the default

    THis example will work with WP USER AVATAR plug-in

    jQuery(“.wp-user-avatar”).parents(“div.user”).remove();

    pass be an URL and the plug-in you are using and I will look

    Well, I use buddypress and my members can upload an avatar (or use gravatar) on the profile page.

    The default avatar is currently displayed to all users who haven’t uploaded an avatar yet (or don’t have gravatar).

    The default avatar (mystery-man.jpg) is located at:

    wp-content/plugins/buddypress/bp-core/images/mystery-man.jpg

    Plugin Author Paul Bearne

    @pbearne

    try this (not tested)

    jQuery(‘div.user a[href$*=”mystery-man.jpg”]’).parents(“div.user”).remove();

    Okay, but where do i put this code? I use shortcode to display the avatar list on my site.

    I still can’t figure out where to place your code. I would really appreciate some help. Thanks.

    Plugin Author Paul Bearne

    @pbearne

    I need an URL or theme details

    But it goes into a JS file

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Show Only Avatars with Images?’ is closed to new replies.