• If user doesn’t have an avatar or if the avatar is set to the default one then a certain widget appears. What is the logic for this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • well, first off, how/what are you using to add avatars to your WP?

    Thread Starter Alex4red

    (@alex4red)

    Oh, I’m using the Buddypress system to add avatars. But, since Buddypress is integrated I don’t think there really is a problem using WP.

    it’s not that there’s a problem, it’s that there are many different ways to add avatars to WP, so I was trying to determine which way you were using so that I might be able to help you as efficiently as possible (i.e. the more information you give, the easier it makes it on others)

    are you trying to show the widget depending on whether or not the “reader” has an avatar?

    Thread Starter Alex4red

    (@alex4red)

    Yes exactly. I need a conditional tag to place inside the widget logic text field to show a widget if he doesn’t have an avatar and if he does it shouldn’t be shown.

    $user_info = get_userdata(get_current_user_id);
    echo "<PRE>".print_r($user_info,true)."</PRE>";

    that will give you all of the user info variables that are set, look for the one containing the avatar.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Widget Logic If user doesn't have an Avatar’ is closed to new replies.