Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Conditional – If profile picture

$
0
0

I have created a user field for profil picture and have made a listing showing all posts together with the profile picture of the author. Not all authors have profile pictures, so I would like to have a conditional checking if the user have uploaded an image. I have tried this:

[wpv-if image="[types usermeta="profile-picture" width="100" height="100" url="true" resize="crop" user_is_author="true"][/types]" evaluate="!empty($image)"]

 <a href="[wpv-post-author format="url"]"><img class="ad-avatar img-circle" src="[types usermeta="profile-picture" width="100" height="100" url="true" resize="crop" user_is_author="true"][/types]" /></a>

[/wpv-if]

But doesn't work?!

Please help me :)


Viewing all articles
Browse latest Browse all 20145

Trending Articles