WordPress.org

Ready to get started?Download WordPress

Forums

How do I have a link open a new window (12 posts)

  1. yvovandoorn
    Member
    Posted 9 years ago #

    Currently I have a link setup via the Write -> Pages function in the WordPress admin function and I would like this link to open in a new window as opposed to taking over my blog window.

  2. techwench
    Member
    Posted 9 years ago #

    Ctrl+click
    Right-click >> Open in new window

  3. yvovandoorn
    Member
    Posted 9 years ago #

    sure that works, but i am talking about by default. when soneone clicks on it that it will open in a new window sort of like the _blank command.

  4. Murry
    Member
    Posted 9 years ago #

    Im not sure I follow. If you want one of the links that you wrote in a Page to open in a new window. When you write your Page stuff, then in there you want a link - just add the link from the clicktags and add the target="_Blank" to the
    eg
    Your Link text
    Im sorry if Ive misunderstood your question.

  5. Murry
    Member
    Posted 9 years ago #

    ahhhh - damit - forgot to textit
    ' IM Specialresor Travel Resources'
    :) sorry new to WP

  6. Murry
    Member
    Posted 9 years ago #

    oh for heavens sake - someone better tell me how to include code as text
    [code]
    a href="http://www.web.com/resource/" TARGET="_blank" > Your link text etc [/code]
    maybe this time?

  7. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Murry - look for the backtick
    On my UK keyboard, it's to the left of the 1 and also has the ¬ character on it.

    Enclosing <code> allows the <brackets> to be seen

  8. Murry
    Member
    Posted 9 years ago #

    Ohhhh - wally - thanks - I used the single quote comma - didnt realise after all these years of programming thats what a "backtick" was - embarressment.
    on my keyord its on the bottom, key with the ¬and ¦ and woho `
    ta Podz

  9. yvovandoorn
    Member
    Posted 9 years ago #

    Thanks for your help everyone. Had a major brain fart / poop.

  10. RazorSA
    Member
    Posted 9 years ago #

    I think that I want to do the same as you.

    When I post a link in one of my articles, it will default to this ...
    <a href="http://xxx.com">xxxx</a>
    where I want it to default to this...
    <a href="http://xxx.com" target="_blank">xxxx</a>

    I tried to dig around in the "quicktags.js" file, but so far, no success. I am sure that I AM in the right place though.

    Help?

  11. Kafkaesqui

    Posted 9 years ago #

    RazorSA, near the end of quicktags.js look for the edInsertLink function, and change this line:

    edButtons[i].tagStart = '<a href="' + URL + '">';

    to:

    edButtons[i].tagStart = '<a href="' + URL + '" target="_blank">';

  12. RazorSA
    Member
    Posted 9 years ago #

    Damn... I had actually already done that... But my browser had obviously cached the js file...

    Thanks for your help man! It is working now!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags