I'm trying to add the following rollover image with a link inside of a PHP if statement.
but the hyperlink disappears when it is executed
<?php
if(file-info) {
echo " <a href="<?php the_field('file-info'); ?>">Access Application</a>";
} else {
echo "You are logged in!";
}
?>
and
<?php if(file-info): ?>
<span class="rcg-line"><a href="<?php the_field('file-info'); ?>">
Access Application</a></span>
<?php else: ?>
<?php endif; ?>
I tried using both examples above and it doesn't seem to work.
update
I'm using the advanced custom fields plugin for wordpress.
file-info is the varible its looking for in which the user entered and the_field is whats used to call it i guess