Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    You will need to add the target="_blank" attribute to the link HTML, like

    <a href="..." target="_blank"><img src="..." ... /></a>

    Regards,
    Tobias

    Thread Starter kapara

    (@kapara)

    please make it as a feature.
    thanks

    lenny

    Thread Starter kapara

    (@kapara)

    sorry, it doesn’t work. or i don’t do it correctly.

    see: https://yuval.shared6.lighthost.co.il/%D7%9E%D7%9F-%D7%94%D7%A2%D7%99%D7%AA%D7%95%D7%A0%D7%95%D7%AA-2/
    (it’s a site in hebrew).

    click an image and you’ll see that the big one opens in the same window.

    look in the page code, look for gif. you’ll see: target=”_blank”.
    what am i doing wrong?

    thanks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    adding this as a feature is not directly possible in the media library, unfortunately. The reason is that that’s coming directly from WordPress.
    If you use the “Insert Link” button, you can however choose to have the link open in a new window.

    Now, in your case, you did add the target="_blank", but in the wrong place. Instead of adding it to the <img> tag, it has to be added to the <a> tag, see my example above.

    By the way: Most web experts consider forcing links to open in a new window/tab a bad thing, because it takes away freedom from the user, see https://css-tricks.com/use-target_blank/

    Regards,
    Tobias

    Regards,
    Tobias

    Thread Starter kapara

    (@kapara)

    i’ll try.
    thank you for your patience.
    thanks
    lenny

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ??

    Best wishes,
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘open link in new window’ is closed to new replies.