Support

Account

Home Forums Backend Issues (wp-admin) Using two same link in different layouts

Solved

Using two same link in different layouts

  • 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.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.