Show something if user meta is empty
-
hi there,
i am developing a multiauthor website using wp. I want to out put author meta in the single page. The output is working fine but to make it better, i want to output something else if the field is empty, especially for field that is not required such as website, twitter or facebook.
Basically i use this to output the field:
<strong>Website:</strong> <a href="<?php the_author_meta( 'website' ); ?>" target="_blank"></a></p>
What i want to do is if the author don’t have any website, so i want to output something like “No website”
How to do this?
O yes, by default this field in wordpress is not empty, it just have content like “https://”
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Show something if user meta is empty’ is closed to new replies.