I'm trying to add a custom profile avatar to Wordpress. I have the field added to the profile and it saves everything fine, but I'm trying to make a conditional that if the user does not upload a custom file, it defaults to the gravatar.
I have this so far:
<?php if(get_the_author_meta('da_avatar') != ''): ?>
<p>Exists!</p>
<?php else: ?>
<p>Does not exist!</p>
<?php endif; ?>
da_avatar
is the ID of the custom field within the profile. This function always yields "DOES NOT EXIST" even if the field is not blank.
Any idea on why it is not working and how I can make it so that if the custom avatar field is empty, it will display "does not exist" and if it is not empty, have it display "Exists!"