Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16714

    Open social links in new tab ( target=’_blank’ ) Angular v1.3

    Anyone know how to do this?

    #92604

    Hi schizorobot,

    In your header.php you will find this code block:

    <!-- ####### HEAD CONTAINER ####### -->

    <?php
    $social = 1;
    echo "<div class='color_strip primary-background'></div>";
    echo "<div id='social_container' class='container_wrap'><div class='container'>";
    echo '<div class="social_container extralight-border">';
    echo '<ul class="social_bookmarks">';
    do_action('avia_add_social_icon','header');
    if($dribbble = avia_get_option('dribbble')) { $social ++; echo "<li class='dribbble'><a href='http://dribbble.com/".$dribbble."'>".__('Follow us on dribbble', 'avia_framework')."</a></li>"; }
    if($twitter = avia_get_option('twitter')) { $social ++; echo "<li class='twitter'><a href='http://twitter.com/".$twitter."'>".__('Follow us on Twitter', 'avia_framework')."</a></li>"; }
    if($facebook = avia_get_option('facebook')) { $social ++; echo "<li class='facebook'><a href='".$facebook."'>".__('Join our Facebook Group', 'avia_framework')."</a></li>"; }
    if($gplus = avia_get_option('gplus')) { $social ++; echo "<li class='gplus'><a href='".$gplus."'>".__('Join me on Google Plus', 'avia_framework')."</a></li>"; }
    if($linkedin = avia_get_option('linkedin')) { $social ++; echo "<li class='linkedin'><a href='".$linkedin."'>".__('Add me on Linkedin', 'avia_framework')."</a></li>"; }

    /*
    //contact icon
    $contact_page_id = avia_get_option('email_page');
    if (function_exists('icl_object_id')) $contact_page_id = icl_object_id($contact_page_id, 'page', true); //wpml prepared
    if($contact_page_id) { $social ++; echo "<li class='mail'><a href='".get_permalink($contact_page_id)."'>".__('Send us Mail', 'avia_framework')."</a></li>"; }
    */

    echo ' <li class="rss"><a href="'.avia_get_option('feedburner',get_bloginfo('rss2_url')).'">RSS</a></li>';
    echo '</ul>';

    avia_banner($social); // avia_banner functions located in functions.php - creates the notification at the top of the site as well as the shopping cart

    echo "</div>";
    echo "</div></div>";
    ?>

    And replace it with this code:

    <!-- ####### HEAD CONTAINER ####### -->

    <?php
    $social = 1;
    echo "<div class='color_strip primary-background'></div>";
    echo "<div id='social_container' class='container_wrap'><div class='container'>";
    echo '<div class="social_container extralight-border">';
    echo '<ul class="social_bookmarks">';
    do_action('avia_add_social_icon','header');
    if($dribbble = avia_get_option('dribbble')) { $social ++; echo "<li class='dribbble'><a href='http://dribbble.com/".$dribbble."' target='_blank'>".__('Follow us on dribbble', 'avia_framework')."</a></li>"; }
    if($twitter = avia_get_option('twitter')) { $social ++; echo "<li class='twitter'><a href='http://twitter.com/".$twitter."' target='_blank'>".__('Follow us on Twitter', 'avia_framework')."</a></li>"; }
    if($facebook = avia_get_option('facebook')) { $social ++; echo "<li class='facebook'><a href='".$facebook."' target='_blank'>".__('Join our Facebook Group', 'avia_framework')."</a></li>"; }
    if($gplus = avia_get_option('gplus')) { $social ++; echo "<li class='gplus'><a href='".$gplus."' target='_blank'>".__('Join me on Google Plus', 'avia_framework')."</a></li>"; }
    if($linkedin = avia_get_option('linkedin')) { $social ++; echo "<li class='linkedin'><a href='".$linkedin."' target='_blank'>".__('Add me on Linkedin', 'avia_framework')."</a></li>"; }

    /*
    //contact icon
    $contact_page_id = avia_get_option('email_page');
    if (function_exists('icl_object_id')) $contact_page_id = icl_object_id($contact_page_id, 'page', true); //wpml prepared
    if($contact_page_id) { $social ++; echo "<li class='mail'><a href='".get_permalink($contact_page_id)."' target='_blank'>".__('Send us Mail', 'avia_framework')."</a></li>"; }
    */

    echo ' <li class="rss"><a href="'.avia_get_option('feedburner',get_bloginfo('rss2_url')).'" target='_blank'>RSS</a></li>';
    echo '</ul>';

    avia_banner($social); // avia_banner functions located in functions.php - creates the notification at the top of the site as well as the shopping cart

    echo "</div>";
    echo "</div></div>";
    ?>

    Hope this helps. :)

    Regards,

    Ismael

    #92605

    Hi,

    I would like to do the same thing (open social links in another window) but this code does not work. I get a blank page.

    Could you please help? Thanks

    #92606

    Oops sorry it does work. I only changed the linkedin line and it is working very well. Thanks

    PS: but copy pasting the whole thing does gives a blank page

    #92607

    Hey!

    Glad that it works now.

    Best regards,

    Peter

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

The topic ‘open social links in new tab ( target='_blank' ) Angular v1.3’ is closed to new replies.