markjaquith / page-links-to

#WordPressPlugin: Lets you make a WordPress page (or other content type) link to an external URL of your choosing, instead of its WordPress URL.
GNU General Public License v2.0
110 stars 46 forks source link

"Open this link in a new tab" not working #171

Open ZohaibHaider7 opened 1 year ago

ZohaibHaider7 commented 1 year ago

Hi Mark! I am using this plugin (latest version) in WordPress version 4.9.8. The issue is that when I give a custom URL and check "Open this link in a new tab", it appends "#new_tab" at the end of the URL, but the link is not opening in a new tab. It opens in the same tab with the URL like this: "http://example-site.com#new_tab".

P.S. I am using a custom theme. Screenshot_8 Screenshot_9 Screenshot_10

jazdauskas commented 1 year ago

Yes, I'm having the exact issue. I only had this issue after the latest update of WordPress. I'm running the 6.2.2 version.

scacchetti commented 1 year ago

Same issue, WP 6.2.2

MadtownLems commented 1 year ago

I ran into this problem, and in my debugging, found that the new-tab.js file was being blocked by my client. Disabling my ad blocker for the site domain seemed to resolve the issue. I'm curious if this fixes it for y'all, as well.

Of course, what would be great is figuring out WHY my adblocker was blocking it and prevent it in the future.

hooker99 commented 1 year ago

I ran into this problem, and in my debugging, found that the new-tab.js file was being blocked by my client. Disabling my ad blocker for the site domain seemed to resolve the issue. I'm curious if this fixes it for y'all, as well.

Of course, what would be great is figuring out WHY my adblocker was blocking it and prevent it in the future.

AdBlockers can block JavaScript (spam etc.). I don't know if it's possible, but plugin author should use HTML: < a target="_blank" href="url_here_or_link">Click me< /a >

You can do a little test: open your blog/website and press the F12 (open console) on your blog and add target="_blank" to the link, then click this link in the browser. AdBlock won't block it.

PS. At the moment, you can use a separate plugin and enter links to be opened in a new window, You can put just link or regex: https://wordpress.org/plugins/open-external-links-in-a-new-window/