On my website I have a list of members and for each of them I display some info. One is the email address.
I would like to show the email address as an icon rather than the actual email address.
The email is dynamically populated by the
<?php
$email_address = $user->user_email;
if ( ! empty( $email_address ) ) {
?>
<div><span class="label">Email address</span><br> <?php echo esc_html( $email_address ); ?></div>
<?php
}
?>
How can I add the icon here? I will remove the label as well and just show the icon.
Thanks
2
Answers
Sorry, one more. I tried to apply the same code to the website but doesn't work.
How in this case the code will be different?
THANKS!!!
A standard image tag should work. Here’s how to add with PHP (untested):