• I’ve recently noticed that the links (menu, posts, etc) are all opening in a new tab/window by default. I’ve made a copy of the site and set it up locally, have disabled all my plugins, am using the freshly installed Twenty Seventeen theme, and just re-installed WordPress 4.7.3 from the WordPress Updates page.

    I’ve cleared every cache I can find, but still no dice… all links are still opening in a new window. Any idea what might be causing this?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Mmm.. link to site?

    It could be a browser setting causing the links to open in new tabs or windows. I’d have to see the actual code to see if the links all had target="_blank" in them or something which would cause it.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please provide a link to a page on your site where we can see this. Thanks.

    Thread Starter geophray

    (@geophray)

    Sorry guys… here is a link: Brave Girls Club

    Thanks so much for the quick replies!

    Thread Starter geophray

    (@geophray)

    Note: this is a link to the live site where the plugins are all still active, but it is the same behavior with them all disabled.

    Some of the links in the sidebar are hard coded to open in a new window, but all of the menu and post title links open in a new window as well and are not coded to do so in the source code. (As far as I can tell.)

    Thanks again for taking a look at this!

    • This reply was modified 7 years, 8 months ago by geophray.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Change the theme to twentysixteen. Does it still do it?

    Thread Starter geophray

    (@geophray)

    Thanks for the suggestion. In TwentySixteen the post title links open in the same window, but the menu links and site banner still open in new windows… although I have gotten it to sporadically open one or two of the links in the same window. It’s inconsistent though, which is super weird.

    I’m setting up a dev version of the site so I can share a link with everything disabled and twentysixteen installed just to make sure I don’t have something cached still. I’ll send it over in a few minutes.

    Clear you browser cache (properly).

    Thread Starter geophray

    (@geophray)

    Thanks everyone for your suggestions. I’ve cleared my cache a number of times, but it doesn’t seem to have any effect on the behavior. (If you know of a better way to clear a cache definitively than via the browser settings, I’m all ears.)

    I have noticed a pattern to whether or not the links open in a new window or not. When I am on the home page, all links behave appropriately, but on any other page they open in a new tab/window whether they are coded to do so or not. Doesn’t seem to matter what browser I am using or how sternly I instruct my browser to clear the cache. ??

    Here is a link to a live copy of the site and below is a screenshot of the behavior I’m trying to correct.

    https://dev.bravegirlsclub.com/

    https://www.screencast.com/t/uIOFJUlecvx

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I see stuff opening in new tabs, but I don’t see any target set in your links so there must be some javascript/jQuery running that’s do it. Unfortunately, I’m not finding it.

    I’m not saying that this is any form of solution, but I just noticed that whenever I went back to my homepage, it opened in a new tab – just like yours.

    Then I realised that I’d not set up my menu properly (I just installed SSL) and my homepage was still redirecting to the https:// version.

    What I would suggest though, is resetting all your outside links to open in the same tab, and installing this plugin to force any outbound links to open in a new tab.

    A bit of a long runaround I know, but if everything is set to normality first, then playing with the outbound links opening in new tabs might work.

    Mine has just started to do that as well. It never used to. I am not a developer at all, so please give me baby steps on how to fix this. Its very annoying!

    This helped me…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to stop site links from opening in new window?’ is closed to new replies.