Support » Themes and Templates » [Theme: Responsive] Social Icons in footer open in new window

  • Resolved Jack Chappell

    (@jackchappell)


    Hey guys,

    I am designing my 3rd WordPress site, (I don’t know much HTML) and was just wondering how i get my Linkedin social icon from my footer (on the site wwww.carat-consultants.co.uk/wordpress) to open in a new window?

    I am using the Responsive WordPress Theme

Viewing 10 replies - 1 through 10 (of 10 total)
  • martcol

    (@hotmale)

    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.

    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>';
    				}
    martcol

    (@hotmale)

    $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!

    Jack Chappell

    (@jackchappell)

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

    martcol

    (@hotmale)

    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!

    Jack Chappell

    (@jackchappell)

    Thank you very much, sorted!

    martcol

    (@hotmale)

    Phew!

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

    martcol

    (@hotmale)

    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.

    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.