Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6265

    The social media icons on the header, I am trying to get them to open in a new window.

    I tried editing the header.php and adding the target attribute but it breaks the page. See below.

    <?php

    if($facebook = avia_get_option('facebook')) echo "<li class='facebook'>Facebook

    Any ideas?

    Thanks

    #53520

    Hey,

    try

    <ul class="social_bookmarks">
    <li class='rss'><a href="<?php avia_option('feedburner',get_bloginfo('rss2_url')); ?>" target="_blank">RSS</a></li>
    <?php
    if($facebook = avia_get_option('facebook')) echo "<li class='facebook'><a href='".$facebook."' target="_blank">Facebook</a></li>";
    if($twitter = avia_get_option('twitter')) echo "<li class='twitter'><a href='http://twitter.com/".$twitter."' target="_blank">Twitter</a></li>";
    ?>
    </ul>

    #53521

    That worked 100%.

    I am complete novice, can you indicate why it had to be done this way and not just by adding the normal target element as in HTML?

    Thank you.

    #53522

    Glad that Chris could help you :)

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

The topic ‘Social Media Open New Window’ is closed to new replies.