Viewing 10 replies - 1 through 10 (of 10 total)
  • To get a link to open a new window/tab you need to use the target attribute in the anchor element.

    How you do that depends on how the social icons are added to your site. If they are hard coded then it’s easy but if they are added with a plugin in or as a theme option, I couldn’t tell you how to do that.

    Thread Starter Jack Chappell

    (@jackchappell)

    Martcol, i have tried this, these icons are built in with the Responsive theme, but i can’t find where the target=blank would go?

    In my footer.php it reads this:

    if( !empty( $responsive_options['linkedin_uid'] ) ) {
    					echo '<li class="linkedin-icon"><a href="' . $responsive_options['linkedin_uid'] . '">'
    						. '<img src="' . responsive_child_uri( '/core/icons/linkedin-icon.png' ) . '" width="24" height="24" alt="LinkedIn">'
    						. '</a></li>';
    				}

    $responsive_options[‘linkedin_uid’] . ‘” target=”_blank”>’

    I am punching above my weight here but I would try that but with a sense there might be a better way of doing it and it might not work!

    Thread Starter Jack Chappell

    (@jackchappell)

    Didn’t seem to work, just removed the footer completely, nice try though

    if( !empty( $responsive_options['linkedin_uid'] ) ) {
    					echo '<li class="linkedin-icon"><a target="_blank" href="' . $responsive_options['linkedin_uid'] . '">'
    						. '<img src="' . responsive_child_uri( '/core/icons/linkedin-icon.png' ) . '" width="24" height="24" alt="LinkedIn">'
    						. '</a>';

    }
    So try sticking it before the href like that?

    After this, we will need to wait for a WordPress Guru!

    Thread Starter Jack Chappell

    (@jackchappell)

    Thank you very much, sorted!

    Phew!

    For a moment there I thought we were going to crash the whole internets!

    PS. If you aren’t using a child theme, don’t forget these kind of edits will be lost if you ever update the theme.

    Thread Starter Jack Chappell

    (@jackchappell)

    Thank you for your help Martcol

    This helped a lot!!!
    Thank you very much ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Theme: Responsive] Social Icons in footer open in new window’ is closed to new replies.