If a variable is not empty, I would like to display some HTML code; otherwise, I would like to display nothing.
I attempted this code, but it is ineffective:
<?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";
}
?>