Support » Fixing WordPress » opening link in /new/ window

  • Resolved formpig

    (@formpig)


    is there a way to get my blog to open a link in a /new/ window instead of taking the place of the existing page?

    thanks

Viewing 15 replies - 1 through 15 (of 20 total)
  • Add target="_blank" to the link.

    <a href="http://yourpage.com/" target="_blank">Your Link Text</a>

    If you want your posts to open in a new window add <base target="_blank" /> to your header.php.

    thanks so much.

    can i ask you to just help me here…?

    ***

    target=”_blank”

    link

    ***

    pdf/formpig_analysis and design of digital surfaces for architecture_chalfant.pdf”>link</a

    is this right? does the spacing have to be exact?

    Sorry, but I have no idea what you mean.

    I think I may have confused you with two separate methods.

    The first target="_blank" will open manually placed links in a new window. <a href="http://yourpage.com/" tartet="_blank">Link Text</a>

    That one is for manually placed links only. It doesn’t matter what the file type is, because target="_blank" just tells the browser to show the document in a new browser window.

    If you want to open the dynamically generated post/title links in another page then you have to place <base target="_blank"> in your header.php file. That way when you click on a post title on your front page, the post will open in a new window, and leave your front page open in it’s original tab/window.

    <base target="_blank"> In the header.php will open all links in a new window BTW, so the only reason you would use target="_blank" on a manually placed link would be if you only wanted to open manually placed links in a new window, and in that case you would not use <base target="_blank"> in the header.php.

    Hopefully you’re less confused now.

    Hey Fish.

    Hopefully I am getting up to speed here. I’m really grateful for the help.

    I will read this and try and respond intelligently. In the meantime, can I try and clarify on my end and say that I used the WordPress interface, typed “link” in the text area (this is below where I linked the image using the little slide icon) and then I selected the text “link” and now I am trying to figure out what link to put in after the filled in “http://” that comes up in the prompt dialog.

    http://formpig.com/blog/?p=732

    Advance aplologies if I am using something wrong here or mis-explaining.

    thanks again.

    Hey Fish.

    Hopefully I am getting up to speed here. I’m really grateful for the help.

    I will read this and try and respond intelligently. In the meantime, can I try and clarify on my end and say that I used the WordPress interface, typed “link” in the text area (this is below where I linked the image using the little slide icon) and then I selected the text “link” and now I am trying to figure out what link to put in after the filled in “http://” that comes up in the prompt dialog.

    http://formpig.com/blog/?p=732

    Advance aplologies if I am using something wrong here or mis-explaining.

    thanks again.

    It all depends; Do you just want to place a hyperlink in your post that will open in a new window when clicked, or do you want all links to open in a new window?

    Hi. Big Thanks.

    I am almost 99 44/100% sure that I want to have all links open in a new window.

    That said, I am pretty used to just clicking an option in my older website UI to “open in a new window”. If I click on the link and it doesn’t open in a new window, I go in and change the pulldown in the UI.

    So – if it keeps me out of the deeper ends of the pool – I don’t mind going in to my list of links to these pdf’s, and simply adding a little bit of extra code. If I test the site and one does not open in a new window I can go in and check the link code to make sure the open in a new window bits are in there…

    I’m sort of all organized and ready to roll with it and this kind of help really is – well – invaluable…

    Thanks.

    Hey Man.

    Thanks. My earlier post seems to have gotten muddled with http somehow. I think I just need help making sure I have the correct syntax for making the link open in a new window.

    You said:

    The first target=”_blank” will open manually placed links in a new window. Link Text

    That one is for manually placed links only. It doesn’t matter what the file type is, because target=”_blank” just tells the browser to show the document in a new browser window”

    And I am wondering if you can help me get the following image in the correct syntax.

    Can you show me how in the following “normal link” I add the: target=”_blank – and what it should look like?

    http://www.formpig.com/pdf/formpig_contouring_mans.pdf

    I’ve been used to doing “http://” and adding http://www.formpig.com/pdf/formpig_contouring_mans.pdf

    So I’m just trying to make sure I add the ‘ and ” and target=”_blank in the right places and in the right way…

    Thank You.

    If you want the link (any link) to open in a new window using HTML code your bit of code should look like this:

    formpig.com

    You must start with opening your <a tag, then use the quotes around the “http://yourURLhere” then you put the target=”_blank” then you close the tag > then put your text you want the user to click on the close the tag You do NOT have to put in the www after the http – it is “assumed.” Just ALWAYS be sure to put the target=”blank” after the http:// URL and ALWAYS BEFORE the closing > tag – before the closing tag. I hope that made sense.

    Grrr – sorry I was afraid of that – it automatically changed my code into a link. I will post the code again – just take out the dashes and spaces and use only the cod in bold…

    <a“href://– –formpig.com– –/pdf/formpig_contouring_mans.pdftarget=” _blank” > Your Link Text here </a>

    Does that make sense to you?

    Hi Coleen, All.

    Yes. I’m most grateful.

    I will take out /all/ of the -‘s, yes? Also should there be /any/ spaces in this code?

    “Your Link Text” just means whatever I want the link to read as, yes? Like above it reads “formpig.com”.

    Also, can I please ask you the following?

    The WP UI allows me to type the Your Link Text part. I then highlight this part and click on the “link” button. At that point a dialog pops up that starts “http://”.

    In this case am I just putting in the text in the code that you give that is after the “//”? For instance I start with “formpig.com/pdf/…”?

    Is that right?

    Thanks!

    esmi

    (@esmi)

    Forum Moderator

    Grrr – sorry I was afraid of that – it automatically changed my code into a link

    Try posting code between backticks (or use the [code] button). Code that is not posted in backticks may be moderated.

    Yes formpig, just take out the spaces and dashes – and put in the URL for your page right after the http://

    Exactly – so your code should look like this: <a "href://formpig.com/pdf/formpig_contouring_mans.pdf" target="_blank" > formpig.com</a>

    (Thanks esmi for the note on how to NOT have my code convert into a link)

    Hi Coleen, esmi, All.

    Almost there. I guess I can’t post an image here but in the WP UI it asks me for a “Link URL” and the entry box is /prefilled/ out with “http://”.

    In your example do I start to put in the part /after/ "<a "href://"

    Yes? If so, do I leave out something at the end?

    *Or* do I put this in /after/ the “http://”?

    I guess i *totally* see the part between “formpig” and “pdf”. I get this part. I don’t understand what this business is at the end or if I need to put my part in quotes or if I have to include the <a "href://

    Can you get me there?

    Thanks.

    Hi Coleen,

    This is the link that I understand:
    www.formpig.com/pdf/formpig_analysis and design of digital surfaces for architecture_chalfant.pdf

    Here is what I am seeing on my end from you:
    "href://formpig.com/pdf/formpig_contouring_mans.pdf" target="_blank" > formpig.com</a>

    Do you want to see:
    “href://www.formpig.com/pdf/formpig_analysis and design of digital surfaces for architecture_chalfant.pdf” target=”_blank” > formpig.com

    Or do you want me to leave out the “www” or anything else?

    Thanks(!)

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘opening link in /new/ window’ is closed to new replies.