Site logo

[Support request] How to Highlight Contributor and Administrator Comment in Posts

Home Forums Support [Support request] How to Highlight Contributor and Administrator Comment in Posts

Home Forums Support How to Highlight Contributor and Administrator Comment in Posts

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #2474451
    Ravi Saive

    Hi Team,

    I want to highlight the comments posted by the Contributor and Administrator account on the posts.

    Find more info in the private section…

    #2474466
    Fernando
    Customer Support

    Hi Ravi,

    The code for that should be something like this:

    .bypostauthor { 
    background-color: #e7f8fb;
    }

    It’s not adding the bypostauthor to your author’s comment. Can you create a test post with a different author, and test if the code works there?

    #2475310
    Ravi Saive

    Hi Fernando,

    Yes, I can’t find bypostauthor in the author’s comment, how could we add it? what’s the solution? I have several authors, it’s a multi-blog author site.

    I added the given code, but it’s not working…

    My requirement is:

    When a WordPress admin replies the comment should be highlighted with an Admin badge…
    Similarly, when a Post author replies comment should be highlighted with an Author badge…

    #2475329
    Fernando
    Customer Support

    Hi Ravi,

    Have you tested this?:

    Can you create a test post with a different author, and test if the code works there?

    What happened? GeneratePress has no control over this class. It’s a WordPress feature.

    Can you also try #1 here and check if that code will work?: https://docs.generatepress.com/article/debugging-tips/

    #2475361
    Ravi Saive

    Hi Fernando,

    I created another article with a different author, but the code is not working…

    #2475364
    Fernando
    Customer Support

    Can you disable all non-GP plugins and add a new comment with that author to test? If you have a staging site, it would be good to test there instead.

    #2475382
    Ravi Saive

    Hi Fernando,

    I tested on the staging site as well, but no luck the code is not working at all, even after disabling all non-GP plugins…

    #2475387
    Fernando
    Customer Support

    Are you using a custom comments section template? For instance, how did you add the comment-reply-titleGot something to say? Join the discussion.?

    #2475393
    Ravi Saive

    Hi Fernando,

    No I am not using any custom comments template, I just used the following code in child functions.php to set the title.

    //change text to leave a reply on comment form
    add_filter( 'generate_leave_comment','tu_custom_leave_comment' );
    function tu_custom_leave_comment() {
        return 'Got Something to Say? Join the Discussion...';
    }
    #2475397
    Fernando
    Customer Support

    I see.

    Can you provide admin login credentials so we can take a closer look?

    Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2475403
    Ravi Saive

    Hi Fernando,

    I can’t give you admin login details, but you can access my machine via Anydesk.

    #2475406
    Fernando
    Customer Support

    Sorry, we don’t have Anydesk. If you can share the login credentials to the staging site, that would be great.

    #2475410
    Ravi Saive

    Hi Fernando,

    The staging is on my local machine, you can download and run Anydesk.

    #2475412
    Fernando
    Customer Support

    Can you share the credentials to the live site instead? We won’t touch/edit anything. We’ll just check some things.

    #2475416
    Ravi Saive

    Sorry, I can’t give an admin login, better if you access my local staging via Anydesk…

Viewing 15 posts - 1 through 15 (of 25 total)
  • You must be logged in to reply to this topic.