WordPress.org

Support

Support » How-To and Troubleshooting » External links in separate pages

External links in separate pages

  • What code should I add to the files of the wordpress installation (or style.css of the template I’m using) in order to make all the external links of my website to open up in new windows?
    Thanks a lot for your help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The easiest way is to do it in the href directly:

    <a href="http://www.somewhere.com">Going somewhere</a>

    maybe orange is talking about 'Going somewhere' with target=”_blank”

    who knows?

    DomFel wants all his external links to open in a new window.

    So do I.

    orangeguru doesn’t resolve the issue very well at all.

    jafer comes along and asks if orange meant to put ‘target=”_blank”‘ into the tag.

    That would resolve it, yes. But what’s this about XHTML-strict?

    Is there something better to use for XHTML compliance?

    Is it rel=”external”?

    How could you cull out all the external links you’ve made in previous posts and assure that they have the appropriate (XHTML-compliant) instruction to open in a new window (or a new tab)?

    I’d use a search and replace on links in the post table.

    The code I have posted before is javascript that will open a new window in all links that have rel=”external” in them.

    You mean by administering the post table directly in phpMyAdmin?

    And where is this JavaScript you have posted before?

    That would be the easiest way, or you could write your own script.

    here is one place I posted it (there are several now):
    http://wordpress.org/support/topic/6642#post-39860

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘External links in separate pages’ is closed to new replies.