I want to display some HTML code if a variable is not empty if not it should display nothing.
This is what I tried but didnt work:
<?php
$web = the_field('website');
if (isset($web)) {
?>
<span class="field-label">Website: </span><a href="http://<?php the_field('website'); ?>" target="_blank"><?php the_field('website'); ?></a>
<?php
} else {
echo "Niente";
}
?>
Can someone help me do this?