how to not display meta if empty
-
Hi guys,
I need a way to not display something if the meta field is empty for the user.
Here’s what I’m doing.
I’ve created a few custom fields, and am displaying them in their users pages. I need away to not display icons for social networks if their not filled. here my code.
<?php $key = 'facebook'; $single = true; $user_last = get_user_meta( $user_id, $key, $single ); echo '<a href="' . $facebook . '"><img src="/img/facebook.png" width="43" height="42" /></a> '; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘how to not display meta if empty’ is closed to new replies.