The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Feature Request - o...
 
Share:
Notifications
Clear all

[Solved] Feature Request - open comment URLs in new tab

3 Posts
2 Users
1 Reactions
1,422 Views
Posts: 41
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
(@wpuser)
Trusted Member
Joined: 6 years ago
[#1933]

Hi Gvectors,

In a future update, could we please have the option for comment links to be opened in a new tab or window? I've searched these forums and have seen solutions that require js code or changing the functions.php file. The problem with this is that there's a concern, particularly among non-developers, that it could break our site if we do it incorrectly. 

A simple toggle that you can switch on/off would be great!

Thanks!


2 Replies
Asti
Posts: 8207
 Asti
Support
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
(@asti)
Illustrious Member
Joined: 8 years ago

Hi @wpuser,

I may suggest you check out the solution provided in this support topic: https://wpdiscuz.com/community/postid/3646/

If you don't want to use some other plugin, you can use the following code:

function t4a_comment_links_in_new_window($text) {
    return str_replace('<a', '<a target="_blank"', $text);
}
add_filter('comment_text', 't4a_comment_links_in_new_window');

Add the following code to your functions.php of your theme. Here is a helpful article: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

 


1 Reply
(@wpuser)
Joined: 6 years ago

Trusted Member
Posts: 41
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

Thanks! Will try this.


Share: