The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
wpdiscuz_comment_au...
 
Share:
Notifications
Clear all

[Solved] wpdiscuz_comment_author does not work properly

5 Posts
2 Users
0 Reactions
776 Views
Posts: 7
Topic starter
(@sostenuto0606work1)
Active Member
Joined: 3 years ago

I can't change the comment author name with wpdiscuz_comment_author.
Do you know the cause?

 

Version 7.3.11

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

Hi @sostenuto0606work1,

Please clarify a bit what kind of code have you used? 

Posts: 7
Topic starter
(@sostenuto0606work1)
Active Member
Joined: 3 years ago

Hello

 

Write to function.php

add_filter ("wpdiscuz_comment_author", function ($ authorName, $ comment) {
$ authorName = "Boss";
return $ authorName;
},10,2);

It doesn't change.

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

Illustrious Member
Posts: 7666

@sostenuto0606work1,

First of all, please remove the extra spaces in the code. It should look:

add_filter ("wpdiscuz_comment_author", function ($authorName, $comment) {
   $authorName = "Boss";
   return $authorName;
},10,2);

Then navigate to Dashboard > wpDiscuz > Settings > General Settings tab, click on the "Purge comments and users caches" button, then delete other plugin caches as well and check again. 

Don't forget to press Ctrl+F5 (twice) on the frontend before checking.

Posts: 7
Topic starter
(@sostenuto0606work1)
Active Member
Joined: 3 years ago

solved.

thank you.

Share: