The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
open in the same wi...
 
Share:
Notifications
Clear all

[Solved] open in the same window

5 Posts
2 Users
0 Reactions
1,216 Views
Posts: 26
Topic starter
(@cihan)
Eminent Member
Joined: 3 years ago

Hello

When I click on the username and profile picture it opens in a new window. There were codes that prevented this, it doesn't work anymore. 🙁

How can I get it to open in the same window?

4 Replies
Asti
Posts: 7516
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Hi @cihan,

Use the following hook code:

add_filter("wpdiscuz_author_link_attributes", function ($attrs) {
    $attrs["target"] = "_self";
    return $attrs;
});

Put the code in the WordPress active theme functions.php file.

This article should be helpful for you:  https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

Please delete all kinds of caches and check again. 

wpDiscuz also has a built-in caches system Please delete this cache as well. It's located in the Dashboard > wpDiscuz > Settings > General Settings tab. 

image
Posts: 26
Topic starter
(@cihan)
Eminent Member
Joined: 3 years ago

Hello thank you very much.

But not working:(

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7516

@cihan,

Please record a video where we can see that you've added the codes and deleted the caches. Also, leave an example URL where we can check the issue.

Posts: 26
Topic starter
(@cihan)
Eminent Member
Joined: 3 years ago

thank you asti, working. 

and i found this code this is for profile picture;

add_filter('wpdiscuz_avatar_link_attributes', function ($attr) {
if (isset($attr['target'])) {
$attr['target'] = '';
}
return $attr;
});

 

Share: