I have created a page called "External" and I have modified functions.php to pick up the link to the "External" page and present "http://www.external.com" instead. This works just fine. How do I get this external link to open in a new window? Where do I go to add the "target=_blank"?
I have tried editing functions.php like this:
Quote:
<?php function replace_menu_link($string) { return str_replace('\"http://mydomain/wordpress/external\"', '\"http://www.external.com/\" target=_\"blank\"' , $string); } |
I am happy for all external links on the menu to open in a new window/tab.
Other plugins I have tried:
* Redirector - means I don't have to edit functions.php and works ok; no new window though
* Identify external links - this works ok on the content of a post but doesn't pick up changes made by Redirector or code changes in functions.php
Is there a plugin that will work with Atahualpa, or do I need to dig further into the code in functions.php?
Sorry if there's a thread on this already, I thought I'd searched enough! Please point me to it if there is one!