<?php $link = ugly_get( 'link' ); ?>
<?php if ( $link ) : ?>
<a href="<?php echo esc_url( $link['url'] ); ?>"
<?php echo '_blank' === $link['target'] ? 'target="_blank" rel="noopener noreferrer"' : ''; ?>>
<?php echo esc_html( $link['title'] ); ?>
</a>
<?php endif; ?>Structured data and templates
A link that opens in a new tab, safely
A link field printed with the right target and rel attributes.
1 minute Works with the free plugin
Did this article answer your question?
Thank you. It helps us make the documentation better. Need more help?