[resolved] Automatically Open Post Images in New Window/Tab (3 posts)

  1. conceptmotion
    Posted 2 years ago #

    I was wondering if anyone could help me out with a bit of code...

    I'm trying to set up a WordPress theme to automatically open images that you put in posts in a new window/tab, without having to manually go into the HTML of every post and add the target="_blank" attribute to your tags.

    Is this possible?


  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Please do not open links in new tabs or windows without warning the user in clear text on the page. This kind of site behaviour breaks the browser Back button & can leave some user groups stranded on the new tab with absolutely no way of getting back to your site.

    If your site contains decent content, your visitors will either make their way back to the page or will open links in new tabs using their controls in their own browsers.

  3. conceptmotion
    Posted 2 years ago #

    Thanks for the reply!

    I totally understand what you're saying. Normally, I don't have images open in new tabs. I just had a very specific situation that I was trying to work through. However, I did find another method to fix the problem without having to open the images in new tabs. So, it all worked out.

    Thanks for the help!

Topic Closed

This topic has been closed to new replies.

About this Topic