Hello! Can you help me, please: I have two same links on page in different layouts, for output them I use code like in documentation
<?php
$link = get_field('link');
if( $link ):
$link_url = $link['url'];
$link_title = $link['title'];
$link_target = $link['target'] ? $link['target'] : '_self';
?>
<a class="button" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo esc_html( $link_title ); ?></a>
<?php endif; ?>
but target from admin panel don’t work for second link – I need target _self, but second link from other layout open in new tab.