AI Assistant
Notifications
Clear all

[Closed] url open in new tab

5 Posts
3 Users
0 Reactions
1,313 Views
Posts: 25
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@pikapower)
Eminent Member
Joined: 6 years ago
[#11563]

Al the url's in our forum don't seem to open in a new tab.
Please advice what to do.

example url ==> https://www.yotpo.com/google-shopping-guide/

 


4 Replies
Sofy
Posts: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

Hi @pikapower,

Put the following js code in your active theme JS files:

jQuery(document).ready(function(){jQuery("#wpforo #wpforo-wrap .wpforo-content a:not([href^=' https://wpforo.com '])").attr("target","_blank");});

Just change the red marked code and use your domain instead of the https://wpforo.com .

This article should be helpful for you:  https://www.collectiveray.com/add-javascript-to-wordpress


1 Reply
(@pikapower)
Joined: 6 years ago

Eminent Member
Posts: 25
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@sofy

Thanks, but now also the topics opens in a new window....


Posts: 1593
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@anonymous20)
Noble Member
Joined: 10 years ago

Remove the above code and use this:

https://wordpress.org/plugins/wp-external-links/

 


Posts: 25
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@pikapower)
Eminent Member
Joined: 6 years ago

tried that and that works better, only embedded urls seems to open in same window

like this one:

https://www.askmathijs.com/e-commerce-events-2020/

 

 

 forum

Share: