WordPress.org

Ready to get started?Download WordPress

Forums

How to make link open to new window? (6 posts)

  1. ericdinn
    Member
    Posted 4 years ago #

    I frequently write blog posts in which I include a link to another webpage, i.e. a NY Times article.

    Presently, when a reader clicks on the link, that new webpage comes up in place of the blog. I would like to change this so that clicking on a link makes it open in a new window?

    How do I do this?

  2. ClaytonJames
    Member
    Posted 4 years ago #

  3. ericdinn
    Member
    Posted 4 years ago #

    Thanks for your response. But what do I do with that? I tried pasting it next to the link, both before and after the link coding which was in html. When I published it and visited the post, the language you gave me ended up coming up on my post just like you typed it.

  4. It goes like this:

    <a href="this.is.mylink.com" target="_blank">This is my cool link</a>

    However I strongly suggest you NOT do that. Most people know 'right click and open in new tab' now and they'll be annoyed.

  5. ClaytonJames
    Member
    Posted 4 years ago #

    Thanks for your response. But what do I do with that? I tried pasting it next to the link, both before and after the link coding which was in html

    What I posted is a link that leads to information and varying opinions about your question as found on Google, not a code to be pasted. My intention was that you would click that link, read some of the information found there, and then be able to make an informed decision about what to do, based on the information and opinions you read.

    Ipstenu's example on how to use target="_blank" will achieve exactly what you want. Sorry for any confusion.

  6. Saildude
    Member
    Posted 4 years ago #

    If you really want the "open in another window" just set it as an option when you insert the link - one of the options is to open in another window - it's the "Target" right below where you insert the link info.

Topic Closed

This topic has been closed to new replies.

About this Topic