Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #9217

    Is there a way to have portfolio URL open in a new window? Currently, when you click on a URL it opens the page in the same window, but I would like to have it open in a new window if possible.

    Many thanks.

    #63887

    The same actually applies to the social icons on the header area. Could those open in a new window?

    #63888

    Hey!

    For the portfolio open up Angular/Includes/loop-portfolio.php and find

    echo "<a href='".get_permalink()."' rel='bookmark' title='".__('Permanent Link:','avia_framework')." ".get_the_title()."'>".get_the_title()."</a>";

    replace it by

    echo "<a href='".get_permalink()."' rel='bookmark' title='".__('Permanent Link:','avia_framework')." ".get_the_title()."' target='_blank'>".get_the_title()."</a>";

    This topic will help you out with the social bookmarks

    Best regards,

    Chris

    #63889

    I updated the code as you suggested, but the URL’s still open in the same window. I’ve refreshed and emptied the cache. I edited the PHP file and uploaded to the server via my FTP app. Tested in Safari, Firefox, Chrome and Opera (all latest versions running on Mac OS X).

    I confirmed the changes had been made by selecting the “loop-portfolio.php” file from the Editor in Appearances.

    #63890

    Hi!

    This is strange, it works fine for me. – You’ve set it to open in a single page, right (in Theme Options)?

    Can you link to the page where this is occurring?

    Regards,

    Chris

    #63891

    It is set up to open in single page through the theme options, under portfolio tab. As an example, view the this link: http://blog.newavemedia.com/portfolio-item/synergy-interactive/

    When you click on the URL for the project it still opens in the same window. My preference is for it to open a new browser window so my site would still be there in the back. The same is true for the homepage when you click and expand the portfolio samples.

    Thanks.

    #63892

    Hey NWM,

    Quick and simple way is to make your links in the meta field always include the target=”_blank” attribute.

    So for the example you linked, the meta field Project URL would be:

    <a href="http://www.synergy-interactive.com/" target="_blank">http://www.synergy-interactive.com/</a>

    #63893

    Devin,

    I don’t have that option since I’m using the PORTFOLIO tab to populate the samples.

    On the left sidebar in WordPress, I click on “Portfolio Items” to create the samples. On the right side, I have the fields to input “Portfolio Categories”, “Skills Needed”, “Client”, and “Project URL”.

    I was hoping that Chris Beard’s PHP edit would solve this issue, but it didn’t.

    #63894

    Never mind. I got it. I was following the instructions to the letter, just inputting the URL without the http prefix, etc., and therefore assumed I couldn’t do the target=”_blank”.

    I now have listed the URLs as:

    Sample Website

    It works for me.

    Now my only question is how to get the social icons on the header to open in a new browser window.

    #63895

    I meant to write the Sample Website in the format you did. Basically, the way Devin described it is how I accomplished it.

    Just need help with the social icons now.

    #63896

    In the header.php file, you’ll want to replace:

    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>"; }

    with

    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>"; }

    #63897

    That did it! All set on that end. Everything opens on a blank page as I hoped for.

    Thanks Chris and Devin for all the help.

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

The topic ‘Open URLs in new window’ is closed to new replies.