The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How to change the "...
 
Share:
Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Solved] How to change the "Author" Label for Administrators

1 Posts
1 Users
0 Reactions
2,701 Views
Asti
 Asti
(@asti)
Illustrious Member Support
Joined: 8 years ago
Posts: 8075
Topic starter  

Let's say the Post Author is also the Administrator of the website. In this case, in the comment section, the user will have an "Author" label when he/she leaves a comment. 

image

To change the label you should use the hook code below:

add_filter("wpdiscuz_author_title", function ($label, $comment) {
    global $post;
    if ($comment->user_id == $post->post_author) {
        $label = __("Administrator", "wpdiscuz");
    }
    return $label;
}, 10, 2);

Put the code in the active theme functions.php file. This article should be helpful for you:  https://themaverickspirit.com/add-code-snippets-functions-php-wordpress/

The red-marked phrase can be changed as you like.   

In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.


   
Share: