1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

I want all external links to open in another tab..

Discussion in 'WordPress' started by BiafranMan, Aug 4, 2008.

  1. #1
    i have a wordpress blog and i want all links that arent of my domain to open in a new tab! how do i do this?
     
    BiafranMan, Aug 4, 2008 IP
  2. seekingff

    seekingff Peon

    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The simplest way would be to just append the target="_blank" tag to the links you want to open in a new tab. For example, <a href="http://www.google.com" target="_blank">Go to Google</a> would open up Google in a new window.
     
    seekingff, Aug 4, 2008 IP
    rchase14 likes this.
  3. BiafranMan

    BiafranMan Peon

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i am not going to do that manually! i refuse...there must be a way/code that you can put put in header or sumthin so that all external links open in new tab!
     
    BiafranMan, Aug 4, 2008 IP
  4. rchase14

    rchase14 Active Member

    Messages:
    324
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #4
    You ask for help but then you refuse to follow directions......as far as I know.....what the last guy posted is how you do it. Good old fashioned HTML tag editing.....
     
    rchase14, Aug 4, 2008 IP
  5. ~kev~

    ~kev~ Well-Known Member

    Messages:
    2,866
    Likes Received:
    194
    Best Answers:
    0
    Trophy Points:
    110
    #5
    When writing an article, highlight the text in the editor, and click "insert link." A "insert / edit link" box will open up. In the "target" drop down menu, choose "open link in new window" and click ok.

    Pretty simple huh.

    :)

    Or, are you talking about links in comments?
     
    ~kev~, Aug 4, 2008 IP
  6. BiafranMan

    BiafranMan Peon

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    no i meant in post...wow you really have to manually set every external link to open in new tab, i guess we havent come that far...
     
    BiafranMan, Aug 4, 2008 IP
  7. ~kev~

    ~kev~ Well-Known Member

    Messages:
    2,866
    Likes Received:
    194
    Best Answers:
    0
    Trophy Points:
    110
    #7
    What fun would it be if all links opened in a new tab or window, and the next guy did not like it that way?

    Just because "you" want it a certain way does not mean the next person does. Personally, I like choices. There is no need in complaining just because "everything" does not go just like what you want it.

    :cool:
     
    ~kev~, Aug 4, 2008 IP
  8. BiafranMan

    BiafranMan Peon

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    lol just asking a question...so all links i made in old post, i have to go back and edit them myself to open in new tab? i cant just put a code sumwhere?!?!
     
    BiafranMan, Aug 5, 2008 IP
  9. SuperAffiliateBlogger

    SuperAffiliateBlogger Peon

    Messages:
    64
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Yes, that is correct.
     
    SuperAffiliateBlogger, Aug 5, 2008 IP
  10. luminati

    luminati Peon

    Messages:
    97
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Add <base target="_blank"> between your <head> and </head> tags. This will set the default target for all links on the page to a new window.
     
    luminati, Aug 5, 2008 IP
    rchase14 likes this.
  11. rchase14

    rchase14 Active Member

    Messages:
    324
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #11
    How do you think HTML got started......I think people that create websites/blogs should be required to take a basic course in building websites.....you know what they teach? How to create a website using Notepad!!!

    Just make the changes already!

    Hint.....sometimes, its better to not have another window open....this forces the visitor to press Back on his/her browser to get back to your site.
     
    rchase14, Aug 5, 2008 IP
  12. rchase14

    rchase14 Active Member

    Messages:
    324
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #12
    You see......this guy knows HTML.....I actually forgot we could do that! Thanks for the reminder of the old fashioned HTML coding.
     
    rchase14, Aug 5, 2008 IP
  13. mizaks

    mizaks Well-Known Member

    Messages:
    2,066
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #13
    mizaks, Aug 5, 2008 IP
  14. adithya

    adithya Well-Known Member

    Messages:
    568
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    110
    #14
    adithya, Aug 5, 2008 IP
    BiafranMan likes this.
  15. acakadut

    acakadut Peon

    Messages:
    194
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I've been searching for this kind of wp plugin as well. Drupal has one as far as I remember. I don't use drupal anymore.
     
    acakadut, Aug 11, 2008 IP
  16. BiafranMan

    BiafranMan Peon

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    BiafranMan, Aug 11, 2008 IP
  17. luminati

    luminati Peon

    Messages:
    97
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Yes, she does. :p
     
    luminati, Aug 20, 2008 IP
  18. dfourss

    dfourss Well-Known Member

    Messages:
    1,271
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    128
    #18
    True, but what happens when the visitor closes the window =by mistake=.

    If I don't have the link open in another window, my site would be gone too.

    I set all my external links to open in a new window
     
    dfourss, Aug 20, 2008 IP
  19. BiafranMan

    BiafranMan Peon

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    i wanted a new tab not new window, and i got code for new tab so close thread...
     
    BiafranMan, Aug 22, 2008 IP
  20. dfourss

    dfourss Well-Known Member

    Messages:
    1,271
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    128
    #20
    Whoa! How about sharing it? What is the code for opening in a new tab?
     
    dfourss, Aug 22, 2008 IP