How to force links from my own domain to open in new tab?
-
I have an affiliate blog that uses Pretty Links URL shortener (WP plugin) to make complicated links shorter and nicer looking. I then link some of the text and all the images in my posts to those shortened links. These links look like this:
https://www.mydomain.com/recommends/nameofthesponsor
https://www.mydomain.com/promovideos/nameofthesponsoror just:
https://www.mydomain.com/nameofthesponsor
Is there a way to force these links to always open in a new tab/window with this plugin, even though they appear to be internal (from mydomain.com)? I can see that under settings there is the option:
Force links to open in a new window if they match this JS regular expression:
But I have no idea how to write the regular JS expression for this. If this is possible to achieve, could you please help me with writing the JS regular expression?
The page I need help with: [log in to see the link]
- The topic ‘How to force links from my own domain to open in new tab?’ is closed to new replies.