• I need to have my social media links open in a new window. I’ve tried to put the blank target code inside the code you see below. But I can’t seem to find the correct placement for the code b/c everytime I save it and try the link it opens in the same window … now a new one.

    Any ideas where I need to place it so it works? Note: I put the {{ }} in place of the < > so it won’t become a link for purposes of this post.

    TIA!!!

    {{a href=”<?php the_field(‘facebook_link’, ‘option’); ?>”><img src=”<?php the_field(‘facebook_icon’, ‘option’); ?>” alt=”syj-facebook”></a}}

Viewing 3 replies - 1 through 3 (of 3 total)
  • Geoffrey Shilling

    (@geoffreyshilling)

    Volunteer Moderator

    In the future, please wrap code in the backtick character or use the code button.

    This should open in a new window for you:
    <a href="<?php the_field('facebook_link', 'option'); ?>" target="_blank"><img src="<?php the_field('facebook_icon', 'option'); ?>" alt="syj-facebook"></a>

    Thread Starter Dzarcone

    (@dzarcone)

    Thanks, Geoffrey! You’re awesome! Thanks for the tip too. I had no idea how to put a link in w/o it actually linking so someone could see it.

    Dana

    Geoffrey Shilling

    (@geoffreyshilling)

    Volunteer Moderator

    You’re welcome! I’m happy to help 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Where do I place my target="_blank" code?’ is closed to new replies.