Notifications
Clear all

[Closed] Opens notifications in a new tab

7 Posts
3 Users
1 Reactions
1,234 Views
Posts: 166
Customer
Topic starter
(@danniee)
Member
Joined: 6 years ago

Sorry, feels like I am bombarding you guys with issue reports :/

I've noticed that when you click any link in the notification box, it opens in a new tab. Is there anyway to stop this from happening? I wish for it to open in the same tab/window. Thank you.

6 Replies
Astghik
Posts: 6127
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

You can use this JS code:

jQuery(document).on('click','.wun-nright a',function(){
       jQuery(this).attr('target','_self');
});

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

Posts: 166
Customer
Topic starter
(@danniee)
Member
Joined: 6 years ago

Thank you. Is this something you could consider adding as an option in the settings? I don't know how to add this code :/

1 Reply
Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6127

@danniee,

Just follow the instruction provided in the link. You don't need to change anything in the code.  

Posts: 166
Customer
Topic starter
(@danniee)
Member
Joined: 6 years ago

Sorry I don't get it. The article is quite extensive and suggests all sorts of things like editing my functions.php (which I failed) or install yet another plugin (which doesn't seem optimal just to accomplish this).

Posts: 166
Customer
Topic starter
(@danniee)
Member
Joined: 6 years ago

I really think you guys should consider changing this so it opens in the same tab. That's how Facebook notifications work and almost everywhere else. It doesn't make sense to open it in a new tab because it's not external links.

1 Reply
 Tom
Admin
(@tomson)
Joined: 10 years ago

Famed Member
Posts: 4209

@danniee,

ok this is also added in the consideration list. I'll update this topic once we considered adding it.

Share:
Scroll to top