wpDiscuz - WordPress Comment Plugin
Link from username ...
 
Share:
Notifications
Clear all

[Solved] Link from username to commentsection in profile

3 Posts
2 Users
0 Likes
259 Views
Orakel
Posts: 105
Topic starter
(@orakel)
Estimable Member
Joined: 2 years ago

Hello friends

I played around with the redirection to the profile if you click on a username.

The link to the user commentsecction is:

https://www.blueaustria.at/members/blueaustria/comments/

where "blueaustria" is the loginname.

I tried the following code, but it doesnt work for me, i hope you can help me =)

//WP Discusz Profile Redirection
add_filter("wpdiscuz_profile_url", function ($profile_url, $user) {
    if ($user->display_name) {
        $profile_url = site_url() . "/members/" . $user->display_name . "/comments/";
    }
   return $profile_url;
}, 10, 2);
2 Replies
Orakel
Posts: 105
Topic starter
(@orakel)
Estimable Member
Joined: 2 years ago

can anyone correct my code please?

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

Illustrious Member
Posts: 5160

@orakel,

Please navigate to Dashboard > wpDiscuz > Settings > General Settings tab press the "Purge Comment and User Caches" button and check again. If you have some other cache plugins delete those caches and check again. 

Share: