WordPress.org

Ready to get started?Download WordPress

Forums

Decode
[resolved] Can social links be configured to open in a new tab/page? (3 posts)

  1. Ownix
    Member
    Posted 10 months ago #

    Hey Scott,

    I am fairly new with wordpress and web design in general so I am sorry if this is a simple issue.

    Is there any way to make my social buttons open in a new tab?

    Thanks,
    Tory

  2. Ownix
    Member
    Posted 10 months ago #

    I hope this isnt the wrong way to do it but I may have found a solution.

    I click "editor" under the theme tab and then selected "header.php" and added

    target="_blank"

    to each of my social icons. For example:

    <a class="sociallink TwitterLink" href="<?php echo esc_url('https://twitter.com/' . get_theme_mod( 'twitter_username' ));?>" rel="me">

    becomes:

    <a class="sociallink TwitterLink" href="<?php echo esc_url('https://twitter.com/' . get_theme_mod( 'twitter_username' ));?>" target="_blank" rel="me">

  3. Scott Smith
    Member
    Theme Author

    Posted 10 months ago #

    That'll do it, but it will be overwritten when you update the theme. If you want the changes to stay, create a child theme.

Reply

You must log in to post.

About this Theme

About this Topic