The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Hide "author", turn...
 
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] Hide "author", turn "Administrator" for the same person

2 Posts
2 Users
1 Reactions
1,634 Views
Posts: 14
Topic starter
(@sparrow123)
Eminent Member
Joined: 5 years ago

Hello! I am author of the post on my site. And in the same time I am administrator of this site. I turned on "Labels", and after this I see my label like "Author" in comments. But I need label "Administrator". How I can get it? If I turn off tick "Author" in plugin's settings, and if I turn on tick "Administrator", I don't see "Administrator" label in the comments anyway - in this case I don't see labels at all.  

Topic Tags
1 Reply
Asti
Posts: 8075
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

@sparrow123,

Use this hook code:

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 value can be changed if it's necessary.   

Share: